$('<p>Add to the Dom</p>').appendTo('body');
It can get extremely complicated sometimes. Imagine if you want to add a class or add some styling to it. So instead, use this format.$('<p></p>',{
text: "Add to the Dom",
class: "ClassName"
}).insertAfter('h1');
No comments:
Post a Comment