Adding

It is possible to add additional elements to current set of elements.

add( element )

Adds more elements to the current element

Parameters:

  • element <CSS String | HTMLElement | Array> Elements that will be added to current collection.
<div id="hi">a</div>
<div id="hi2">b</div>
<div id="hi3">c</div>
alert(Karma('#hi3').add('#hi2')); // [ <div id="hi3">c</div>, <div id="hi2">b</div> ]

addSelf( )

Adds previously matched elements.

<div id="hi">a</div>
<div id="hi2">b</div>
<div id="hi3">c</div>
alert(Karma('#hi2').siblings().addSelf().get()); // [ <div id="hi">a</div>, <div id="hi3">c</div>, <div id="hi2">b</div> ]
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki