I want to create a Jquery script which scrolls down to the next device whenever a user clicks
I have pixel offset from above every DIV.
I do not know how the number of loops or clicks is counted.
jquery (document) .ready (function () {var move = [0,642,1725,2393,3036,6097 , 69 9]] var i = 0; var period = 500; jQuery (".exe"). Click (function () {//event.preventDefault (); jQuery ('html, body'). Chetan ({ ScrollTop: move [i] + 'px'}, period);})});
Try i = (i == 7)? I = 0: I << code> and move [i ++]
jQuery (document) .ready (function () {var move = [0, 642, 1725, 2393, 3036, 60 9 7, 69 9]; var i = 0; var period = 500; jQuery ("next.") Click (function () {//event.preventDefault ( ); I = (i == 7)? I = 0: i; jQuery ('html, body'). Chetan ({scrollTop: move [i ++] + 'px' // Set the current value and it Increasing from 1, duration);})});
Comments
Post a Comment