4 ms·
That creates a event handler for all images on mouseover, even images that haven't been created yet. You want to trigger the mouseover event, not bind to it. A
by zaius 14y ago
That creates a event handler for all images on mouseover, even images that haven't been created yet.
You want to trigger the mouseover event, not bind to it. And you want to trigger it after the image has been inserted. Unfortunately there's no jquery event for dom insertions. But on firefox you can use a MutationObserver:
MutationObserver(function(event) {
$(event[0].addedNodes[0]).mouseover();
}).observe($('body')[0], {childList: true});
- lazerwalker 14y agoWhoops, you're 100% correct.