fix menu.js.php

This commit is contained in:
Fred Tempez 2021-03-22 17:18:46 +01:00
parent 0512fd914f
commit 6c893e4333
1 changed files with 10 additions and 9 deletions

View File

@ -79,15 +79,7 @@ $("input, select").on("change", function() {
) {
css += 'nav{padding:0 10px;}';
}
// Ajout du css au DOM
$("#themePreview").remove();
$("<style>")
.attr("type", "text/css")
.attr("id", "themePreview")
.text(css)
.appendTo("head");
// Position du menu
switch($("#themeMenuPosition").val()) {
case 'hide':
@ -129,6 +121,15 @@ $("input, select").on("change", function() {
$("nav").show().prependTo("#site");
break;
}
// Ajout du css au DOM
$("#themePreview").remove();
$("<style>")
.attr("type", "text/css")
.attr("id", "themePreview")
.text(css)
.appendTo("head");
});
//
// Lien de connexion (addClass() et removeClass() au lieu de hide() et show() car ils ne conservent pas le display-inline: block; de #themeMenuLoginLink)