Posted By

epyyjop on 04/02/12


Tagged

insert


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

spee66
BrockSamsom


Create insert text


 / Published in: jQuery
 

URL: http://tutsplus.com/lesson/creating-and-appending-content/

Create an open and close h2 add the text, class append to the article

  1. $('<h2></h2>', {
  2. text: 'Hello from js 2',
  3. class: 'myClass'
  4. }).appendTo('article');

Report this snippet  

You need to login to post a comment.