mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-30 11:06:55 -05:00
Fix for time
tag in HTML 5 time
when using IE <8 [treyp]
This commit is contained in:
parent
1e94ff79a0
commit
644e63e52e
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue