MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
pure JS didn't make the things easier... I'll try now with wiki markup only
(getRandomNumber: write the output directly in the page, allowing to use the value as parameter in the built in parser functions of the wiki...)
(pure JS didn't make the things easier... I'll try now with wiki markup only)
Line 217: Line 217:
     }
     }
}
}
 
 
// Return a random number between the specified range
function getRandomNumber(range,out) {
    randomNumber = Math.floor((Math.random()*range)+1);
    document.getElementById(out).innerHTML=randomNumber;
}
 
$( createNavigationBarToggleButton );
$( createNavigationBarToggleButton );

Navigation menu