inside a normal JS function:
$('#friendsPop').jGrowl("testtmee");
Wont work, but:
$.jGrowl("testmeee");
Works just fine.. I have tested everything, and if i make a link outside a function, a normal a: link like this:
<a href="javascript:void(0);" onclick="$('#friendsPop').jGrowl('testme');">link</a>
It works fine too. But i wish to activate
$('#friendsPop').jGrowl("testtmee");
After an ajax successcall, and i need to have an ID.
What can i do about this?
I've used jGrowl from time to time, and I don't recall ever invoking it on a selected set of jQuery objects. The whole point of jGrowl is that it produces "unattached" messages at the window level -- a single global stream of messages, regardless of how they're invoked (or from where). Just like the Mac OS X Growl concept on which it's based.
Checking the jGrowl documentation, I also don't see any example where it's called like this:
It's always like this:
If it's working for you this way on occasion, it's fortuitous happenstance (I haven't looked at the jGrowl source code to figure out why, but I'm sure the answer's there).
Just call it
$.jGrowl('Like This')and you're all set.