View source for MediaWiki:Mobile.js
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/* Il codice JavaScript inserito qui viene caricato da ciascuna pagina, per tutti gli utenti. */
mw.loader.using('mobile.site.styles');
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if(document.getElementById("myBtn")!=null){
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
if(document.getElementById("myBtn").style!=null){
document.getElementById("myBtn").style.display = "block";
document.getElementById("myBtn").onclick = function() {topFunction();};
}
} else {
if(document.getElementById("myBtn").style!=null){
document.getElementById("myBtn").style.display = "none";
}
}
}
}
function topFunction() {
console.log("topFunction");
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
000
1:0
Return to MediaWiki:Mobile.js.