Posted By

paul0078 on 04/15/12


Tagged

javascript jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hurcy


jQuery create a new element


 / Published in: JavaScript
 

  1. $('<div>',{
  2. id: 'test',
  3. text: 'This is the element text',
  4. class: 'Paul',
  5. click: function(){
  6. alert('Liverpool');
  7. }
  8. }).insertAfter('article');

Report this snippet  

You need to login to post a comment.