PDA

View Full Version : Touch Image Gallery -- Autostart option?



CookieMonster
09-02-2014, 07:34 AM
1) Script Title: Touch Image Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/touchgallery.htm

3) Describe problem: Can I make this script do an "auto start" so that the slideshow will automatically start when the webpage is loaded but a user can also use the manual controls if they want to? If so, what code do I need to add and where? I tried on my own; I failed. :-)

Thanks!

ddadmin
09-07-2014, 11:19 PM
Sure, try the below modified .js file, which adds a autostart option. To use it, add the line in red to your intialization code:

jQuery(function(){ // on DOM load
$('div#touchgallery1').touchgallery({ // initialize first demo
width: 250,
height: 200,
autostart: [true, 2000]
})

})

where 2000 denotes a 2000 millisecond pause between frame change.