Using these methods, you can change the contents and order of the DOM tree.
Returns the innerHTML of the first element in Karmagination.
<div id="one">Hi</div>
alert(Karma('#one').html()); // Hi
Sets the innerHTML of the elements to val.
<div>a</div> <div>b</div>
Karma('div').html('hi'); alert(Karma('div').eq(0).html()); // hi
Returns the innerText of the first element.
<div>a <b>b</b></div>
Karma('div').text(); // returns 'a b'
Change the innerText of the elements.
Karma('div').text('hello'); Karma('div').text(); // returns 'hello'
Appends content (element/elements/html) to current set of elements
Appends current set of elements to the elements that are matched by the selector (element/elements/html)
Prepends content (element/elements/html) to current set of elements
Prepends current set of elements to the elements that are matched by the selector
Inserts the elements that matches the selector after current elements.
Inserts the elements that matches the selector before current elements.
Inserts current elements after the elements that matches the selector (element/elements/html).
Inserts current elements before the elements that matches the selector (element/elements/html).
Wrap the current elements with the html. Note: Karmagination only supports unnested html, ie: <div></div> but not <div><span></span></div>
Removes all the descendants of the current elements.
Removes current elements that matches the selector from the document.
Make clones of the current elements. Event cloning is not supported yet.