Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AndrewHenderson/jSticky

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jSticky

jQuery plugin to keep select DOM element(s) in view while scrolling the page. Features stop points and z-indexing. Works when being applied to a class of multiple elements simultanesouly.

Using jSticky

$('#foo').sticky();

Options

Top spacing, z-index, and stopper.

$('#foo').sticky({
	topSpacing: 80, // Space between element and top of the viewport
	zIndex: 100, // z-index
	stopper: "#bar" // Id, class, or number value
	stickyClass: false // Class applied to element when it's stuck
});

Note: If no stopper id or class is provided, the default is 'sticky-stopper'. You can also use number values for pixel points on the y-axis.

Tip: Use the zIndex option if you need to stack various sticky elements while scrolling the page.

About

jQuery plugin to make any DOM element(s) remain in view while scrolling the page.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.