javascript - going to first div after scroll going to top of the last div -


i have problem scrolling. when clicking on <a href="#" id="display" class="display">next</a> tag, page scrolls next div. when scrolling top of last div , clicking "next", must go top of first div, doesn't.

demo

modified code:

  if (t === 'next' ) {     if($('.current').next('.section').length==0)     var $next = $('#one');     else     var $next = $('.current').next('.section');   } 

working demo


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -