createElement()
The SniperJS createElement() is use to create an Element into selected DOM element
Examples:
$("#mydiv").createElement('p');Returns
Create a div element
$("body").createElement('div');Create element with classes and id
$("body").createElement('div.myclass1');
//output:
<body>
<div class="myclass1"></div>
</body>$("body").createElement('div.animate.active.faster#element20');
//output:
<body>
<div class="animate active faster" id="element20"></div>
</body>Prepend
Define attributes as you create
Creating an Element for Multiple elements
Last updated