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


You need to login to view comments.