Your Ad Here

Posted By

omerta83 on 07/08/10


Tagged

javascript jquery


Versions (?)

Using .end() for effective traversing


 / Published in: JavaScript
 

  1. $("
  2. <ul>
  3. <li> </li>
  4. </ul>
  5.  
  6. ") // li
  7. .find("a") // a
  8. .attr("href", "http://www.google.com/") // a
  9. .html("Google!") // a
  10. .end() // li
  11. .appendTo("ul");
  12.  

Report this snippet  

You need to login to post a comment.