Changes

Jump to: navigation, search

MediaWiki:Common.js

576 bytes added, 16:19, 29 October 2014
Javascript for Template:Icon tooltips (shows the image caption in a tooltip).
$(this).children('.spoilers-show').show();
$(this).children('.spoilers-hide').hide();
});
 
// Gorgonzola: [[Template:Icon]] tooltips
var elItemTT;
 
function ggItemTT(bDisp, sTitle) {
if (bDisp && !elItemTT) {
elItemTT = $('<div class="gg-icon-tt"></p>').appendTo('body');
}
if (bDisp) {
elItemTT.text(sTitle).show();
} else {
elItemTT.hide();
}
}
 
$("body").on("mouseover mouseout mousemove", ".js-icon-tt", function(ev) {
ev.preventDefault();
if (ev.type !== "mousemove") {
var sTitle = $(this).parent("a").attr("title");
ggItemTT(ev.type == "mouseover", sTitle);
}
elItemTT.css({ top: ev.pageY -24 , left: ev.pageX +5 });
});
2,804
edits

Navigation menu