Fix #281. Add mouse-over precise time and on-click switch listener.

This commit is contained in:
Justin Nuß 2014-07-24 22:31:59 +02:00
parent c20f5dc2ea
commit 835e85b5ce
4 changed files with 81 additions and 2 deletions

View file

@ -960,6 +960,18 @@ function initOrganization() {
console.log("init script : organization done");
}
function initTimeSwitch() {
$(".time-since[title]").on("click", function() {
var $this = $(this);
var title = $this.attr("title");
var text = $this.text();
$this.text(title);
$this.attr("title", text);
});
}
(function ($) {
$(function () {
initCore();
@ -988,6 +1000,8 @@ function initOrganization() {
if ($('#body-nav').hasClass("org-nav")) {
initOrganization();
}
initTimeSwitch();
});
})(jQuery);