Skip to content

Commit

Permalink
Fix for time tag in HTML 5 time when using IE <8 [treyp]
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Jan 4, 2010
1 parent 1e94ff7 commit 644e63e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.timeago.js
Expand Up @@ -85,7 +85,9 @@
return new Date(s);
},
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);
}
});
Expand Down

0 comments on commit 644e63e

Please sign in to comment.