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:
无闻 2014-08-01 00:15:06 -04:00
commit 568c9b353e
4 changed files with 80 additions and 2 deletions

View file

@ -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);