append()
A SniperJs method used to insert specified content at the end or the beginning of the selected elements.
Parameters of Sniper append() method
Parameter
Description
Append HTML String
$("p").append("<b>Newly added appended text</b>.");
//the element is inserted at the end of the selected element$("ol").append("<li><b>Newly added appended item</b></li>",true);
//this goes to the beginning of the selected elementInserting DOM Element
$("p").append($('#mylink'));Prepend element
$("#div").append($('#text'),true);Inserting content using a function
Inserting Array of elements or Nodelists
Last updated