Type: Element

Extends the Element Type to include the pin method useful for fixed positioning for elements.

Tutorial/Demo

Element Method: pin

Affixes an element at its current position, even if the window is scrolled.

Arguments

  1. pin - (boolean, optional) true: pins the element; false: unpins the element; defaults to true; See also Element:unpin.

Syntax

$('myElement').pin();

Returns

  • (element) This Element.

Element Method: unpin

Un-pins an element at its current position (see Element:pin).

Syntax

$('myElement').unpin();

Returns

  • (element) This Element.

Element Method: togglePin

Toggles the pin state of the element.

Syntax

$('myElement').togglePin();

Returns

  • (element) This Element.

Comments

comments powered by Disqus

This documentation is released under a Attribution-NonCommercial-ShareAlike 3.0 License.