-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Everything works as it should until I implement the listener.
$('#Timestamp').on('change.livestamp', function(event, from, to) {
event.preventDefault(); // Stop the text from changing automatically
console.log(from,to);
if(to.indexOf("ago")){
$(this).removeClass("label-success label-warning").addClass("label-danger").html(to);
} else {
$(this).html(to);
}
}).livestamp();
It goes from saying 3 hours ago to saying a few seconds ago on load. Like it's just using the current time instead of the data attribute time provided.
Metadata
Metadata
Assignees
Labels
No labels