I need to call a custom function after i toggle all my items. Not for each one.
Lets say we have an alert:
function myAlert() { alert("OK"); }
If I code like this, it calls for each time it toggles:
$('div.myGroupOfItems').toggle('fast',function() {
myAlert();
});
How can I do it like this, since mine is a custom JS function? This way it doesn’t work:
$('div.myGroupOfItems').toggle('fast').myAlert();
Or other solutions?
You can use this from jQuery 1.6 onwards…