2017-11-23 18:09:36 -05:00
|
|
|
function timeago()
|
|
|
|
{
|
|
|
|
$("time.timeago").timeago();
|
|
|
|
$("time.timeago").each(function(){
|
|
|
|
var date = new Date($(this).attr("datetime"));
|
|
|
|
$(this).attr("title",date.toLocaleString());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
(function(){
|
|
|
|
timeago();
|
2017-12-12 08:17:10 -05:00
|
|
|
|
|
|
|
$("body").on("click", ".navbar-toggle", function(){
|
|
|
|
$($(this).data("target")).toggleClass("collapse");
|
|
|
|
});
|
2017-11-23 18:09:36 -05:00
|
|
|
|
|
|
|
var incidents = $('.timeline');
|
|
|
|
$("body").on("click", "#loadmore", function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var url = $("#loadmore").attr("href") + "&ajax=true";
|
|
|
|
$("#loadmore").remove();
|
|
|
|
|
|
|
|
$.get(url,
|
|
|
|
function(data){
|
|
|
|
incidents.append(data);
|
|
|
|
timeago();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
|