Question

I have this code here which i use in order to load some images in a slider:

<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery.cycle.all.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('#myslides').cycle({
         slideResize: true,
             containerResize: false,
             width: '1138px',
         height: '532px',
    });
});
</script>

My problem is that, when i do a refresh, only the first image comes as it should, but the other ones, they are just displayed as tiny rectangles, i need to modify it, in order for the images to start sliding only when they are all loaded.

Help please

Était-ce utile?

La solution

Please correct your javascript and try. Last attribute of any json shouldn't be followed by comma(,). Please remove the comma after height attribute value & try if it works.

<script type="text/javascript">
    function pageLoad(){
        $('#myslides').cycle({
                 slideResize: 1,
                 containerResize: 1,
                 fit: 1,
                 width: '1138px',
                 height: '532px' 
        });
    }
</script>

I think you have set options to true or false, but at http://jquery.malsup.com/cycle/options.html options are set to 1 or 0. Please refer jQuery Cycle Plugin - Option Reference for more details.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top