views:

383

answers:

1

I have written my own image slider in jQuery that slides up a caption div from the bottom of the image.

Please see the demo on the following link: http://beta.marhaba.co.nz/about

When viewing this page in Google Chrome, you will notice how the caption div does not appear from the bottom of the image, but from below the image. To best understand what I am describing please see the link I have posted.

How do I fix this behaviour? Please note that the caption div has a height: auto.

I currently animate the caption div as follows:

$('.caption-container', $(this)).effect('slide', {direction: 'down'}, 'fast');
+1  A: 

I'm pretty sure that the issue here is your CSS, not your JavaScript. Could you try setting the following CSS?

div#barak ul.pictures {
    overflow:hidden;
}

I think that will stop the caption from showing below the slideshow.

BBB
In Google Chrome, that has fixed the glitching of the caption, however, the caption wrapper div no longer slides up from the bottom as an animate.Also just noticed that the CSS is not making the Javascript effect look right in IE.See the update page on the same link - http://beta.marhaba.co.nz/about
Hady
Ok, perhaps you could try using the animate function and an absolute position?You'll need to position the caption absolute for this to work.$('.caption-container', $(this)).animate({ top: "xxxpx" }, 500 );
BBB