Use this modified version of the script:
Attachment 4240
It will allow you to do in the on page call, for instance:
Code:
<script type="text/javascript">
stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause: function(){return 1000+Math.floor(Math.random()*5001) + 500;}},
panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:false},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['10/leftnav.gif', -5, 80], rightnav: ['10/rightnav.gif', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})
</script>
Let's zoom in on that line:
Code:
autostep: {enable:true, moveby:1, pause: function(){return 1000+Math.floor(Math.random()*5001) + 500;}},
Notice that it is a true function requiring a closing brace in addition to the autostep object's closing brace. I added 500 (the panelbehavior.speed) because I wasn't sure if that 1000 you had there represented that, or was for some other purpose.
Also of note is the fact that you may still use a regular number there instead of a function if you like. In other words, if you have other carousels on this or other pages that you want to use a fixed number for the pause, you can do so without needing a copy of the old script to do it.
Note: This update also contains code that allows for defining the cursor for disabled nav buttons. That code also removes the title from disabled nav buttons. See inside the js file near the top for this configuration line (may be left as is):
Code:
defaultbuttonscur: 'default', //Cursor style for disabled nav buttons (Dec 3rd, 11)
It only comes into play if the carousel's wraparound is false.
Bookmarks