I’m using this plugin to replace jQuery’s imgload event with one that will fire regardless of whether the image is cached.
The (minimal) documentation says to use it thus:
Usage: $(images).bind('load', function (e) { // Do stuff on load });
So, two questions. One, do I just link to the plugin into my header next to jQuery? And two, is my implementation
$('#preload img:first-child').load(activateThumb);
Equivalent to the one above (ie do I need to pass e to the load() function?
do I just link to the plugin into my header next to jQuery?– YesEquivalent to the one above (ie do I need to pass e to the load() function?– it’s up to you – if you don’t need it in your handler – no need to passeinto it, but I think you should still usebindfunction, since I don’t see that plugin addingloadmethod to add event handler