Posted By

alyssonweb on 12/14/10


Tagged

jquery name tag tagname


Versions (?)

jQuery tagName


 / Published in: jQuery
 

  1. jQuery.fn.extend({
  2. tagName: function(){
  3. if(1 === this.length){
  4. return this[0].tagName.toLowerCase();
  5. } else{
  6. var tagNames = [];
  7. this.each(function(i, el){
  8. tagNames[i] = el.tagName.toLowerCase();
  9. });
  10. return tagNames;
  11. }
  12. }
  13. });

Report this snippet  

You need to login to post a comment.