Abbreviates a jQuery collection, hiding or showing n elements. Provides a DOM element that, when clicked, will reveal the abbreviated elements.
n | If positive, indicates the number of items shown. If negative, the number hidden. (required) |
options | Plugin options (all optional). |
options.text | The innerText of the returned link. {#} is replaced with the number of hidden elements. |
jQuery <a> element that, when clicked, will reveal the abbreviated elements. Needs to be inserted into the DOM. If the number of the items in the collection is fewer than n, returns an empty jQuery collection
var $list = $('#items'); $list.children('li').abbreviate(3).insertAfter($list);
Chuck Harmston: ch@chuckhar mston.com uck
0.1