Fix #281. Add mouse-over precise time and on-click switch listener.
This commit is contained in:
parent
c20f5dc2ea
commit
835e85b5ce
4 changed files with 81 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue