Jquery Gallery. Calculate the position and size of the photo
Hello. I'm trying to finish this code, so that the image can be a different size in the gallery. Now they have the same size of 150px, which is set in the img.
<img width="150" height="150" src="#"/>
I think so
var w = $(this).width();
var h = $(this).height();
var pos = $(this).position();
and while animating:
$(this).animate({ height: h + '+150px', width: w + '+150px', left: pos + '-=35', top: pos + '-=35' }
but it's not working. what am I doing wrong? Demo - http://jsfiddle.net/HAQt3/1/ .In the end, I want to get something like this http://i.pixs.ru/storage/7/9/3/220pxDiver_8448503_5895793.png where the images are all different sizes and beautifully arranged, and if they increase guidance. Thanks