MediaWiki: Common.js : Différence entre versions
De ECU
| Ligne 2 : | Ligne 2 : | ||
| − | $(function | + | $(function () { |
| − | document.getElementById(" | + | var myElement = document.getElementById('popupr'); |
| + | myElement.innerHTML = '<button id="button_modal" onclick= "openmodal()" > Popup is coming !</button>'; | ||
}); | }); | ||
| − | |||
| − | + | $(function openmodal(){ | |
| − | + | ||
| + | document.getElementById("modal").style.top = "200px"; | ||
}); | }); | ||
Version du 19 avril 2019 à 16:05
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
$(function () {
var myElement = document.getElementById('popupr');
myElement.innerHTML = '<button id="button_modal" onclick= "openmodal()" > Popup is coming !</button>';
});
$(function openmodal(){
document.getElementById("modal").style.top = "200px";
});
