javascript - jssor Scrolling Logo/Thumbnail Slider won't start automatically on page load -
could me jssoor scrolling logo/thumbnail slider please?
i did implement in website scrolling through "partners logos". working charm expect 1 thing. when load page, thumbnail slider shows 1 icon/logo until drag left or right slightly. whole animation starts , required number of logos appear.
i wondering did wrong or did miss.
i did included required .js files. don't know if helps set up:
jquery(document).ready(function ($) { var options = { $autoplay: true,//[optional] whether auto play, enable slideshow, option must set true, default value false $autoplaysteps: 1,//[optional] steps go each navigation request (this options applys when slideshow disabled), default value 1 $autoplayinterval: 1000,//[optional] interval (in milliseconds) go next slide since previous stopped if slider auto playing, default value 3000 $pauseonhover: 0,//[optional] whether pause when mouse on if slider auto playing, 0 no pause, 1 pause desktop, 2 pause touch device, 3 pause desktop , touch device, 4 freeze desktop, 8 freeze touch device, 12 freeze desktop , touch device, default value 1 $slideeasing: $jssoreasing$.$easelinear, //[optional] specifies easing right left animation, default value $jssoreasing$.$easeoutquad $slideduration: 500,//[optional] specifies default duration (swipe) slide in milliseconds, default value 500 $mindragoffsettoslide: 0,//[optional] minimum drag offset trigger slide , default value 20 $slidewidth: 60,//[optional] width of every slide in pixels, default value width of 'slides' container $slideheight: 60,//[optional] height of every slide in pixels, default value height of 'slides' container $slidespacing: 60,//[optional] space between each slide in pixels, default value 0 $displaypieces: 4,//[optional] number of pieces display (the slideshow disabled if value set greater 1), default value 1 $parkingposition: 0,//[optional] offset position park slide (this options applys when slideshow disabled), default value 0. $uisearchmode: 1,//[optional] way (0 parellel, 1 recursive, default value 1) search ui components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc). $playorientation: 1,//[optional] orientation play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value 1 $dragorientation: 1//[optional] orientation drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value 1 (note $dragorientation should same $playorientation when $displaypieces greater 1, or parking position not 0) }; var jssor_slider1 = new $jssorslider$("slider1_container", options); //responsive code begin //you can remove responsive code if don't want slider scales while window resizes function scaleslider() { var bodywidth = document.body.clientwidth; if (bodywidth) jssor_slider1.$scalewidth(math.min(bodywidth, 800)); else window.settimeout(scaleslider, 30); } scaleslider(); $(window).bind("load", scaleslider); $(window).bind("resize", scaleslider); $(window).bind("orientationchange", scaleslider); //responsive code end });
thank in advance.
ok folks, here way how did overcome issue slider in case. this thread , solution helped lot! added code responsive scaling of slider width of parent element:
var jssor_slider1 = new $jssorslider$("slider1_container", options); //responsive code begin function scaleslider() { var parentwidth = jssor_slider1.$elmt.parentnode.clientwidth; if (parentwidth) jssor_slider1.$scalewidth(math.min(parentwidth, 1920)); else window.settimeout(scaleslider, 30); } scaleslider(); $(window).bind("load", scaleslider); $(window).bind("resize", scaleslider); $(window).bind("orientationchange", scaleslider); //responsive code end
- on top of had wrap slider in box padding on sides helped tidy up. helped scale slider inside of column getting "window slider" on bottom of page in particular resolution. works charm. finally. thank guys , hits. without wouldn't able manage issue.
Comments
Post a Comment