Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 785 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 785 Bytes

jQuery Sap

Sap is a jQuery plugin that makes the elements of your choosing sticky (see what we did there?) when scrolling. By default, your elements will stick to the top of the viewport, but this behavior may be changed by setting the distanceFromTheTop option.

Requirements

  1. jQuery

Usage

You can apply Sap to any element in the DOM by simply calling $(selector).sap()

$('#item').sap();

You can also specify the distance from the top of the viewport that you want Sap to activate

$('#item').sap({
	distanceFromTheTop: 0
});

Demo

View Demo Here View Other Demo

License

Licensed under the MIT License.