Posted By

omerta83 on 07/08/10


Tagged

javascript jquery


Versions (?)

Using .data() method for storing the info on DOM nodes


 / Published in: JavaScript
 

  1. $("div").data("myName", 'addy');
  2. $("div").data("myName") === 'addy';
  3.  
  4. /* Here are two ways to remove all of the information
  5. bound to an element*/
  6. $("div").removeData();
  7. $("div").remove();
  8.  

Report this snippet  

You need to login to post a comment.