codrops / Elastislide

Elastislide is a responsive image carousel that will adapt fluidly in a layout. It is a jQuery plugin that can be laid out horizontally or vertically with a pre-defined minimum number of shown images
362 stars 111 forks source link

Problem Cached images #8

Closed marchetb closed 11 years ago

marchetb commented 11 years ago

First I would like to thank you for the job you done. But, I got some problem with elastislide.js.. When my browser cache is empty (for chrome,firefox and safari), and all of my website is loading, the elastislide is working fine and show my items. However, when I reload the page, the items are cached, they doesn't appears. They are loaded, but max-height and height are set to 0px.

Thanks in advance for the help. Benjamin.

marchetb commented 11 years ago

I was doing a bad thing uin my js. I wasn't using the onReady function of elastislide.

$('#carousel').elastislide({ onReady:function () { $('.elastislide-wrapper').hide(); $('#elast_close').hide(); if ($.browser.msie) { $('#elast').bind("click", function () { $('.elastislide-wrapper').slideDown(500);}); $('#elast_close').bind("click",function () { $('.elastislide-wrapper').slideUp(500);}); } $('#elast').click(function () { $('.elastislide-wrapper').slideDown(500); $(this).hide(); $('#elast_close').show(); }); $('#elast_close').click(function () { $('.elastislide-wrapper').slideUp(500); $(this).hide(); $('#elast').show(); }); } });