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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -