new to the community.
I have a slideshow on one of my pages. The images vary in height so I've written this:
$(document).ready(function(){
$('.pslider img:first').load(function(){
var firstImg = $('.pslider img:eq(0)').height();
$('.pslider').css({"height":firstImg});
});
//other code
});
As far as I can tell this means that jquery will wait until the first img element withing my .pslider is loaded. Then it will get the img height and set the .pslider height to the value. I used serialscroll to manage the change of class height using its onbefore option. it works perfectly.
This works on a normal click to the page. But if I click on the page, then go to another, then press the back button, it doesn't execute. Doesn't get a value for the height.
I've tried window.onload(){} but the same thing happens.
I'm using 1.6.2
Any ideas?