Skip to content

catiraumihail/sticky.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sticky.js

StickyJS is a small and powerfull javascript plugin for easy create sticky elements. No other libraries is needed. Support IE8+.

stickyJs('.sticky-widget').setOptions({relativeElement: '.content', topMargin: 46}).start();

Options:

{
	className: 'stickyJsElement',    // sticky element extra class name
	staticClassName: 'sticky-fix',   // static sticky element  extra class name
	fixedClassName: 'sticky-fix',    // fixed sticky element  extra class name
	absoluteClassName: 'sticky-abs', // absolute sticky element  extra class name
	topMargin: 0,                    // margin top  if you have fixed top bar
	bottomMargin: 0,                 // margin bottom if you want 
	relativeElement: 'body'          // sticky relative element class name, id or element
}

About

javascript sticky plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.0%
  • JavaScript 33.5%
  • CSS 4.5%