Ci-dessous, les différences entre deux révisions de la page.
| |
js:fullwidth_toggle [2023/02/14 16:19] – créée avillepreux | js:fullwidth_toggle [2024/03/11 09:48] (Version actuelle) – avillepreux |
---|
jQuery('.dw-page-icons>ul').prepend('<li><a class="fullwidth_toggle" href="javascript:void(0);" style="text-decoration: none">◁▷</a></li>'); | jQuery('.dw-page-icons>ul').prepend('<li><a class="fullwidth_toggle" href="javascript:void(0);" style="text-decoration: none">◁▷</a></li>'); |
| |
jQuery(".fullwidth_toggle").click(function() { if (jQuery(".fullwidth_toggle").html().indexOf("◁▷") > -1) { jQuery(".fullwidth_toggle").html('▷◁'); jQuery(".container").css("width", "calc(100vw - 18px)"); jQuery(".container").css("max-width", "100%"); } | jQuery(".fullwidth_toggle").click(function() { if (jQuery(".fullwidth_toggle").html().indexOf("◁▷") > -1) { jQuery(".fullwidth_toggle").html('▷◁'); jQuery(".container").css("width", "calc(100vw - 64px)"); jQuery(".container").css("max-width", "100%"); } |
else { jQuery(".fullwidth_toggle").html('◁▷'); jQuery(".container").css("width", "calc(100vw - 18px)"); jQuery(".container").css("max-width", "1300px"); } }); | else { jQuery(".fullwidth_toggle").html('◁▷'); jQuery(".container").css("width", "calc(100vw - 64px)"); jQuery(".container").css("max-width", "1300px"); } }); |
} | } |
| |