Fix for time tag in HTML 5 time when using IE <8 [treyp]

This commit is contained in:
Ryan McGeary 2010-01-04 12:43:13 -05:00
parent 1e94ff79a0
commit 644e63e52e

View file

@ -85,7 +85,9 @@
return new Date(s); return new Date(s);
}, },
datetime: function(elem) { datetime: function(elem) {
var iso8601 = $(elem).is('time') ? $(elem).attr('datetime') : $(elem).attr('title'); // jQuery's `is()` doesn't play well with HTML5 in IE
var isTime = $(elem).get(0).tagName.toLowerCase() == 'time'; // $(elem).is('time');
var iso8601 = isTime ? $(elem).attr('datetime') : $(elem).attr('title');
return $t.parse(iso8601); return $t.parse(iso8601);
} }
}); });