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.

Эта документация распостраняется на правах Attribution-NonCommercial-ShareAlike 3.0 License.
Оригинал документации на английском.
© Linux.ria.ua, 2008-2024