Reputation: 2785
<abbr class="timeago" title='<%= DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ") %>'><%= String.Format("{0:MMMM d, yyyy}", DateTime.Now) %></abbr>
$(document).ready(function () {
$('abbr.timeago').timeago();
});
<abbr class="timeago" title="2011-12-29T00:21:40Z">December 29, 2011</abbr>
Rendered in the browsers as: December 29, 2011.
Why? Thanks.
i've resolved this issue had an error in my console.
However, this still fails to do anything when this item is being passed to jquery templates as ${streamObj.DateTime}
=>
objStreamItem.DateTime = DateTime.Parse(sqlReader["DateTime"].ToString()).ToString("yyyy-MM-ddTHH:mm:ssZ");
Also, the jquery template is loaded from an external js file which in turn is loaded depending on some other page load criteria.
thanks.
Upvotes: 0
Views: 369
Reputation: 185923
It works for me...
HTML:
<abbr class="timeago" title="2011-12-29T00:21:40Z"></abbr>
JavaScript:
$( '.timeago' ).timeago();
Live demo: http://jsfiddle.net/B5ebS/
Your code probably throws an error somewhere causing your program to break...
Upvotes: 1