javascript - After jquery .load() I cannot operate with script on images -
after clicking on menu item data loaded "#content". want use function makegray() turns pictures class "gallerylist" grayscale , saturating them after pointing mouse. unfortunately, code below doesn't work until second click:
$(document).delegate(element, 'click', function() { $('#content') .stop() .animate({opacity: 0}, 'fast', function() { $(this).load('subpage.html', function() { makegray('.gallerylist'); }) .animate({opacity: 1}); }); });
edit after kevin , daniel posts: there code of script making pictures gray. problem how wait until images loaded , run script.
Comments
Post a Comment