IE & hasAttribute !!!

Just a stupeed error with the hasAttribute() in IE that made me to spend some time to fix it, after a search thru Google, here is what I came up for, noted here for convenience:

 MYJSLIB.hasAttribute = function(e, attr) {
  return typeof e.attributes[attr] != “undefined”;
};

 

Related posts:

Share

About number.0