JS: Move to next section class

Soldato
Joined
27 Dec 2005
Posts
17,310
Location
Bristol
I'm working on a site that uses full height sections. I don't like some of the plugins you can get that override normal scrolling but I would like a fixed down arrow that allows you to move down to the next section.

This script works, but only for the first section:

Code:
$("#move-down").click(function() {
		var cls = $(this).closest(".section-full").next().offset().top;
		$("html, body").animate({scrollTop: cls}, "slow");
	});

Is there a way of a similar script allowing the page to scroll to the next .section-full, rather than just the first/top one?
 
Back
Top Bottom