これを次のクラスにスクロールするにはどうすればよいですか?
var $root = $('html, body');
$('a.scroll-to-next-nav').click(function(){
$root.animate({
scrollTop: $( $(this).closest('.header-icons').nextAll('.header-icons') ).offset().top
}, 500);
return false;
});
<div class="header-icons"><a href="#" class="scroll-to-next-nav" title="Go to next section">Go to next section</a></div>
<div class="header-icons"><a href="#" class="scroll-to-next-nav" title="Go to next section">Go to next section</a></div>
<div class="header-icons"><a href="#" class="scroll-to-next-nav" title="Go to next section">Go to next section</a></div>