I have a lot of images on a page and the have to be a little bit larger, so i dont want to change all of the css.
I have made a couple of lines of code which doesn't give the right values back.
The images have all diffrent sizes.
- $('.imgbox').each(function(){
var getX = $(this).width();
var getY = $(this).height();
var addX = 10;
var xH = getY + addX;
var xW = getX + addX;
$(this).children('img').css({width: xW + 'px', height: xH+ 'px'});
});
- <div class="imgbox">
<img src="image_blabla.jpg" /> - </div>
there's probably some thing wrong because it gives me very big values back.