Merge pull request #311 from nuss-justin/issue/281
Fix #281. Add mouse-over precise time and on-click switch listener.
This commit is contained in:
commit
568c9b353e
4 changed files with 80 additions and 2 deletions
|
@ -1120,6 +1120,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();
|
||||
|
@ -1148,6 +1160,8 @@ function initOrganization() {
|
|||
if ($('#body-nav').hasClass("org-nav")) {
|
||||
initOrganization();
|
||||
}
|
||||
|
||||
initTimeSwitch();
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue