Skip to content

DanielGH/jQuery.scrollSections

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Scroll Sections Plugin (Version 0.4.2)

A plugin that allows you to define (full page) sections and scroll between them with mousewheel, keyboard, scrollbar and/or touch moves.

Here is a very simple demo

Requirement (for a full support)

The following jQuery plugins are required for this plugin to work properly:

Examples

Here is a basic example

$('.my_sections').scrollSections();

Here is a example with custom navigation (full implementation in ./example/customNavigation.html)

$('.my_sections').scrollSections({
	createNavigation: false,
	navigation: true
});	

Here is a full options example

$('.my_sections').scrollSections(
{
    // Attribute from which we retrieve the unique identifier for each section.
	attr: 'id',
	// The class that should be applied to the current navigation item.
	active: 'active-scrollsection',
	// Enable keyboard controls.
	keyboard: true,
	// Enable mousehweel controls.
	mousewheel: true,
	// Enable touch controls.
	touch: true,
	// Enable scrollbar controls.
	scrollbar: true,
	// Enable navigation controls, also see createNavigation option.
	navigation: true,
	// Maximum sections to scroll within mousewheel interaction.
	scrollMax: 1,
	// Function to execute before each scroll.
	before: null,
	// Function to execute after each scroll.
	after: null,
	// Prefix for classes and ids of DOM elements.
	prefix: 'scrollsections',
	// Scroll to first section on initialization, instead of the section that is visible. Also have a look at the option
	// animateScrollToFirstSection.
	alwaysStartWithFirstSection: false,
	// Scroll to initial section without animation.
	animateScrollToFirstSection: false,
	// Create navigation? If the option navigation is set to false, this will have no effect!
	createNavigation: true,
	// The animation speed.
	speed: 500,
	// Throw execption if something goes wrong.
	exceptions: false
});

Cross-browser Compatibility

Modern browsers: Chrome, Firefox, Safari, Opera and IE8+

License

Under MIT license

Copyright(c) 2011-2013 Stéphane Guigné

About

Full page sections

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published