מדיה ויקי:Gadget-CiteTooltip.js: הבדלים בין גרסאות בדף
(←using [[mw:CodeEditor|CodeEditor]]: הערות עם שם.) |
(←using [[mw:CodeEditor|CodeEditor]]: כשההערה ברבע השמאלי של המסך, להסיט ימינה כדי למנוע חריגה.) |
||
שורה 1: | שורה 1: | ||
if (wgAction == 'view') | if (wgAction == 'view') | ||
mw.loader.using('jquery.tipsy', function() { | mw.loader.using('jquery.tipsy', function() { | ||
var createHint = function() { | var | ||
createHint = function() { | |||
return $($.escapeRE(this.href.replace(/.*#/, '#'))).html(); | |||
tipsyParams = {html: true, delayOut: 1500, delayIn: 300, fade: true, opacity: 1, title: createHint}; | }, | ||
gravity = function() { | |||
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 4) ? 'n' : 'nw'; | |||
}, | |||
tipsyParams = {html: true, delayOut: 1500, delayIn: 300, fade: true, opacity: 1, gravity: gravity, title: createHint}; | |||
$(function() {$('sup.reference a').tipsy(tipsyParams);}); | $(function() {$('sup.reference a').tipsy(tipsyParams);}); | ||
}); | }); |
גרסה מ־18:25, 3 בפברואר 2012
if (wgAction == 'view')
mw.loader.using('jquery.tipsy', function() {
var
createHint = function() {
return $($.escapeRE(this.href.replace(/.*#/, '#'))).html();
},
gravity = function() {
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 4) ? 'n' : 'nw';
},
tipsyParams = {html: true, delayOut: 1500, delayIn: 300, fade: true, opacity: 1, gravity: gravity, title: createHint};
$(function() {$('sup.reference a').tipsy(tipsyParams);});
});