开发者

Is there a way to update a jgrowl message?

Is there a way using jgrowl(or any other growl like popup) to update a message if it hasn't been remo开发者_运维问答ved yet and if it has been removed just simply add it like normal?


I think I found some changes that will make it possible to do what I want with jgrowl. http://www.moonlitscript.com/post.cfm/jgrowl-modification


Instead of modifying the plugin, I think an easier way would be to make a function to find text inside the growl, then remove it. I've tested the code below, it works and it doesn't appear to cause any problems with the plugin.

This function will remove the growl based on it's contents

function clearGrowl(txt){
 $('.jGrowl-notification:contains("' + txt + '")').remove();
}

If you only want to target the header of the growl, then modify it as follows:

function clearGrowl(txt){
 $('.jGrowl-notification .header:contains("' + txt + '")').remove();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜