forked from varia/web-narrowcast
added script to end of HTML now reading mobile sidemenu function
This commit is contained in:
parent
123bc71f80
commit
6972bebf93
@ -250,5 +250,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="narrowscripts.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user