מדיה ויקי:Gadget-CiteTooltip.js: הבדלים בין גרסאות בדף

מתוך צפונות ויקי
(?)
(.)
שורה 7: שורה 7:
gravity = function() {
gravity = function() {
var loc =  
var loc =  
($(this).offset().top > ($(document).scrollTop() + $(window).height() -80) ? 's' : 'n') +
($(this).offset().top > ($(document).scrollTop() + $(window).height() - 120) ? 's' : 'n') +
($(this).offset().left > ($(document).scrollLeft() + $(window).width() / 4) ? '' : 'w');
($(this).offset().left > ($(document).scrollLeft() + $(window).width() / 4) ? '' : 'w');
return loc;
return loc;

גרסה מ־18:54, 3 בפברואר 2012

if (wgAction == 'view')
mw.loader.using('jquery.tipsy', function() {
	var 
		createHint = function() {
			return $($.escapeRE(this.href.replace(/.*#/, '#'))).html();
		},
		gravity = function() {
			var loc = 
				($(this).offset().top > ($(document).scrollTop() + $(window).height() - 120) ? 's' : 'n') +
				($(this).offset().left > ($(document).scrollLeft() + $(window).width() / 4) ? '' : 'w');
			return loc;
		},
		tipsyParams = {html: true, delayOut: 1500, delayIn: 300, fade: true, opacity: 1, gravity: gravity, title: createHint};
		
	$(function() {$('sup.reference a').tipsy(tipsyParams);});
});