Cross-browser hasAttribute


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. hasAttribute: function(node,attr) {
  2. if(node.hasAttribute) return(node.hasAttribute(attr));
  3. else return(!!node.getAttribute(attr));
  4. },

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.