MediaWiki:Vector.js : Différence entre versions
De Sciencinfolycee
($ -> $j) |
(On enlève le menu de gauche "Les ressources du SILO") |
||
Ligne 19 : | Ligne 19 : | ||
$j(window).resize(center); | $j(window).resize(center); | ||
center(); | center(); | ||
+ | |||
+ | // Remove the menu p-Les_ressources_du_SILO if Javascript does work | ||
+ | $j("#p-Les_ressources_du_SILO").remove(); | ||
}); | }); |
Version du 6 février 2012 à 13:50
/* Any JavaScript here will be loaded for users using the Vector skin */ $j(document).ready(function() { // Add header links var links = $j("<div id='links'><a href='http://science-info-lycee.fr/une-equipe-a-votre-service/'>Le SILO</a><span>-</span><a class='selected' href=''>Ressources</a><span>-</span><a href='http://science-info-lycee.fr/le-forum/'>Echanger</a></div>"); $j("body").prepend(links); // Center all elements; var linksLeft = parseInt($("#links").css("left")); var center = function() { var width = $(window).width(); var left = (width - 1100) / 2; $j("#mw-head").css("left", left + "px"); $j("#mw-panel").css("left", left + "px"); $j("#content").css("left", (left + 280) + "px"); $j("#content").css("height", (Math.max($("#content").height(), $("#mw-panel").height()) - 20) + "px"); $j("#links").css("left", (linksLeft + left) + "px"); } $j(window).resize(center); center(); // Remove the menu p-Les_ressources_du_SILO if Javascript does work $j("#p-Les_ressources_du_SILO").remove(); });