Creating a website, I encountered the following problem:
I have a small image, in one of the attributes of which there is a link to a large one.
With the loading of the page you can not upload pictures, because links to pictures come ajax'om.
When I click on a small, I get a big one, but, it is first displayed, and then loaded, because of which jerking is created.
I think the task is clear:
I want some function to be performed after clicking on a small image, and after loading a large image, a function is also performed (another)
Thanks in advance
Rummaged in nete, did not really find
$('<div class="alert-wrapper"><div class="alert-shadow"></div><div class="pictures-box"></div></div>').appendTo('body'); var box = $('div.pictures-box').hide(); var inner = '<div class="alert-box-header alert-blue">Обзор изображений</div><div class="pictures-container"><table><tr><td><img/></td><td><img/></td><td><img/></td></tr></table><div class="alert-box-input"><input type="button" value="OK" /></div></div>'; shadow.css({opacity: 0.1}).fadeIn(300); box.html(inner); var imgs=$('div.pictures-container img'); if (data.photo1) {imgs[0].src='/images/big_images/'+data.photo1;} else imgs.eq(0).remove(); if (data.photo2) {imgs[1].src='/images/big_images/'+data.photo2;} else imgs.eq(1).remove(); if (data.photo3) {imgs[2].src='/images/big_images/'+data.photo3;} else imgs.eq(2).remove(); box.fadeIn(300);