javascript - Supersized - choose different set of slides -
i using supersized plugin site , know if possible do following:
- i have 5 sets of pictures, 2 pictures in set.
- when page loads, play randomly 1 set , stop.
basically, want supersized choose different set of slides each time page reloads.
thank help.
i figured myself:
var setnum; setnum = math.floor((math.random()*5)+1); switch (setnum) { case 1: jquery(function($){ $.supersized({ // functionality slide_interval : 5000, // length between transitions transition : 1, // 0one, 1-fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left, 6-carousel right, 7-carousel left transition_speed : 3000, // speed of transition stop_loop : 1, //pauses slideshow upon reaching last slide. // components slide_links : 'blank', // individual links each slide (options: false, 'num', 'name', 'blank') slides : [ // slideshow images {image : 'image1.jpg'}, {image : 'image1-2.jpg'}, ] }); }); break; case 2: jquery(function($){ $.supersized({ // functionality slide_interval : 5000, // length between transitions transition : 1, // 0one, 1-fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left, 6-carousel right, 7-carousel left transition_speed : 3000, // speed of transition stop_loop : 1, //pauses slideshow upon reaching last slide. // components slide_links : 'blank', // individual links each slide (options: false, 'num', 'name', 'blank') slides : [ // slideshow images {image : 'image2.jpg'}, {image : 'image2-2.jpg'}, ] }); }); break; case 3: jquery(function($){ $.supersized({ // functionality slide_interval : 5000, // length between transitions transition : 1, // 0one, 1-fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left, 6-carousel right, 7-carousel left transition_speed : 3000, // speed of transition stop_loop : 1, //pauses slideshow upon reaching last slide. // components slide_links : 'blank', // individual links each slide (options: false, 'num', 'name', 'blank') slides : [ // slideshow images {image : 'image3.jpg'}, {image : 'image3-2.jpg'}, ] }); }); break; case 4: jquery(function($){ $.supersized({ // functionality slide_interval : 5000, // length between transitions transition : 1, // 0one, 1-fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left, 6-carousel right, 7-carousel left transition_speed : 3000, // speed of transition stop_loop : 1, //pauses slideshow upon reaching last slide. // components slide_links : 'blank', // individual links each slide (options: false, 'num', 'name', 'blank') slides : [ // slideshow images {image : 'image4.jpg'}, {image : 'image4-2.jpg'}, ] }); }); break; case 5: jquery(function($){ $.supersized({ // functionality slide_interval : 5000, // length between transitions transition : 1, // 0one, 1-fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left, 6-carousel right, 7-carousel left transition_speed : 3000, // speed of transition stop_loop : 1, //pauses slideshow upon reaching last slide. // components slide_links : 'blank', // individual links each slide (options: false, 'num', 'name', 'blank') slides : [ // slideshow images {image : 'image5.jpg'}, {image : 'image5-2.jpg'}, ] }); }); break; }
Comments
Post a Comment