Permalink
Browse files

Fixed IE shitting its pants over the whole .is('[itemscope]') thing.

  • Loading branch information...
1 parent b58a771 commit 3bc79ec330116a5d5e52972052e0153495b2ade9 @KrofDrakula committed Feb 3, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 jquery.microdata.js
View
@@ -90,7 +90,9 @@
var parseElement = function(el) {
if(!el.jquery) el = $(el);
- if(!el.is('[itemscope]')) return null;
+ var itemscope = el.attr('itemscope');
+ // if the element in question isn't an itemscope, return null
+ if(typeof itemscope == 'undefined' || itemscope === false) return null;
var propElements = el.find('[itemprop]'), props = [];
propElements.each(function() {
@@ -114,7 +116,7 @@
}
});
- return { type: el.attr('itemtype') || null, properties: props };
+ return { type: el.attr('itemtype') || "", properties: props };
};

0 comments on commit 3bc79ec

Please sign in to comment.