MediaWiki:BibleGet.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 38:
console.log('This element was off the bottom of the screen');
let newTop = top - excessHeight;
$bGetTIP.css({"top":newTop});▼
} else if (excessHeight > rect.y){
$bGetTIP.append($('<div>',{class:'closeButton',text:'x'}));▼
$bGetTIP.on('click','.closeButton',function(){▼
$bGetTIP.addClass('hidden');▼
$bGetTIP.css({"top":'',"left":''});▼
});▼
//distance of the top of the current window from the top of the document▼
let newTop = (window.pageYOffset || (document.documentElement || document.body.parentNode || document.body).scrollTop) + 20;▼
$bGetTIP.css({"top":newTop});
}
Line 50 ⟶ 60:
$bGetTIP.css({"left":newLeft});
}
▲ $bGetTIP.addClass('sticky');
▲ $bGetTIP.append($('<div>',{class:'closeButton',text:'x'}));
▲ $bGetTIP.on('click','.closeButton',function(){
▲ $bGetTIP.addClass('hidden');
▲ $bGetTIP.css({"top":'',"left":''});
▲ });
}▼
▲ //distance of the top of the current window from the top of the document
▲ let newTop = (window.pageYOffset || (document.documentElement || document.body.parentNode || document.body).scrollTop) + 20;
▲ $bGetTIP.css({"top":newTop});
}
}
Line 125 ⟶ 123:
console.log('This element was off the bottom of the screen');
let newTop = top - excessHeight;
$bGetTIP.css({"top":newTop});▼
} else if (excessHeight >= rect.y){
$bGetTIP.addClass('sticky');▼
$bGetTIP.append($('<div>',{class:'closeButton',text:'x'}));▼
$bGetTIP.on('click','.closeButton',function(){▼
$bGetTIP.addClass('hidden');▼
$bGetTIP.css({"top":'',"left":''});▼
▲ });
//distance of the top of the current window from the top of the document▼
let newTop = (window.pageYOffset || (document.documentElement || document.body.parentNode || document.body).scrollTop) + 20;▼
$bGetTIP.css({"top":newTop});
}
Line 137 ⟶ 145:
$bGetTIP.css({"left":newLeft});
}
▲ $bGetTIP.addClass('sticky');
▲ $bGetTIP.append($('<div>',{class:'closeButton',text:'x'}));
▲ $bGetTIP.on('click','.closeButton',function(){
▲ $bGetTIP.addClass('hidden');
▲ $bGetTIP.css({"top":'',"left":''});
▲ //distance of the top of the current window from the top of the document
▲ let newTop = (window.pageYOffset || (document.documentElement || document.body.parentNode || document.body).scrollTop) + 20;
▲ $bGetTIP.css({"top":newTop});
}
}
|