I was wondering if there is any way to set the slider bar plays automatically like for example, when I click the play button, the slider bar and the value will increase automatically. Here is my slider bar: JSFiddle
Basically what I wanted is I clicked on the play button, then the slider bar and its value will increase automatically and stops for few seconds at each value before increment.
Through my research, I know there is a method called setInterval() will repeat certain event automatically but I not sure how to implement it.
And this is my Fiddle after I added the auto play function but my slider bar is not coming out.
$('#btnPlay').on('click',function(){, (here you did not called btnPlay correctly as it requires # for calling by id) then the line ends with a.that is not required. Then you are trying to set valuessetValuewith a:in between while it should be,(a comma). This will make your slider show.