javascript - Jssor slider does not start automatically -


here code; slider not start automatically:

<div id="slider" style="position: relative; margin: 0px;  top: 0px; left: 0px; width: 100%;  height: 300px; overflow: hidden;">             <div   u="slides" style="cursor: default;  width: 960px; height: 300px;overflow: hidden;"> 

i think because of width=100% in parent div. when change width 960px i.e. px value (width=960px) works fine width reduces.

screenshot reference

screenshot reference

edit:

http://pixelcreations.in/parking/ link reference

autoplay set true

error in console when width set 100%

uncaught error: cannot scale jssor slider, 'width' of 'outer container' not specified. please specify 'width' in pixel. e.g. 'width: 600px;' jssor.slider.js:1952

uncaught typeerror: cannot read property '$enableplayer' of undefined

you setting width of slider 70% of available width.

//calculate slider width 70% of available width var sliderwidth = availablewidth * 0.7; 

so changed :

var sliderwidth = availablewidth * 1; 

or better :

var sliderwidth = availablewidth; 

check plunker: http://plnkr.co/edit/mw58px1v1zhr3iuamg2c?p=preview


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -