added script to end of HTML now reading mobile sidemenu function

This commit is contained in:
JoanaChicau 2021-05-25 16:46:18 +02:00
parent 123bc71f80
commit 6972bebf93
2 changed files with 16 additions and 10 deletions

View File

@ -250,5 +250,10 @@
</div>
<script type="text/javascript" src="narrowscripts.js"></script>
</body>
</html>

View File

@ -43,19 +43,20 @@ $(function() {
}
function fsidemobile(x) {
if (x.matches) { // If media query matches
var element = document.getElementById("side");
element.classList.toggle("sideminclicked");
} else {
element.classList.toggle("");
}
}
// SCRIPT MOBILE SIDEMENU HIDE
var x = window.matchMedia("(max-width: 768px)")
fsidemobile(x)
x.addListener(fsidemobile)
function fsidemobile(x) {
if (x.matches) { // If media query matches
var element = document.getElementById("side");
element.classList.toggle("sideminclicked");
} else {
element.classList.toggle("");
}
}
fsidemobile(x)
function hideshowWelcome() {