MediaWiki:Common.js: Difference between revisions

mNo edit summary
mNo edit summary
Line 104: Line 104:
       this.innerHTML = bulletChars[currentIndex];
       this.innerHTML = bulletChars[currentIndex];
       localStorage.setItem(localStorageKey + index, currentIndex.toString());
       localStorage.setItem(localStorageKey + index, currentIndex.toString());
    });
  });
});
/* EDITORIAL NOTATION TOOPTIP INCREASED SPEED */
$(function() {
  $('.editorial-notation-tooltip').on('mouseover', function(e) {
    var $this = $(this);
    var titleText = $this.find('span').attr('title');
    if (titleText) {
      var $tooltip = $('<div class="editorial-notation-tooltip-box"></div>').text(titleText);
      $('body').append($tooltip);
      $tooltip.css({
        top: e.pageY + 10,
        left: e.pageX + 10,
        position: 'absolute'
      }).fadeIn('fast');
    }
  }).on('mouseout', function() {
    $('.editorial-notation-tooltip-box').fadeOut('fast', function() {
      $(this).remove();
    });
  }).on('mousemove', function(e) {
    $('.editorial-notation-tooltip-box').css({
      top: e.pageY + 10,
      left: e.pageX + 10
     });
     });
   });
   });
});
});