php - Height of div using jQuery? -
i have created portfolio image gallery can't captions work properly... using: http://s3.amazonaws.com/buildinternet/live-tutorials/sliding-boxes/index.htm (i'm using second one)
the problem captions different sizes i'm trying use code below:
$('.boxgrid.caption').hover(function () { var $height = $("#description-text", this).height(); $(".cover", this).stop().animate({ top: '375' - $height }, { queue: false, duration: 160 }); }, function () { $(".cover", this).stop().animate({ top: '365px' }, { queue: false, duration: 160 }); });
but reason output code of $height
395 when should 150 or somewhere along lines...
please help...
thanks ben
$("#description-text", this)
rather odd.
$("#description-text")
should suffice, provided have 1 element id in code. if not, well, problem.
Comments
Post a Comment