Commit 3c3f7d0c authored by Gautam Chitnis's avatar Gautam Chitnis

Fix (playlist and side nav):Fixed the issue with open/close in mobile view

Playlist and side nav were allowed to be opened simultaneously in mobile view, cluttering the screen.
This commit fixes the issue and allows only one of them to be expanded at one time.

Gautam C.
parent e2a5cc91
......@@ -26,7 +26,12 @@ $(function() { // Handler for .ready() called.
vueInit();
$('#openNavButton').on('click',function (e){
notifyBus("openNav");
if($(window).width() <= 480 && $('#playlistNav').css("width") == "60%"){
notifyBus("closePlaylist");
notifyBus("openNav");
} else {
notifyBus("openNav");
}
});
$('#closeNavButton').on('click',function (e){
notifyBus("closeNav");
......@@ -44,7 +49,12 @@ $(function() { // Handler for .ready() called.
notifyBus("toggleRandom");
});
$('#mobilePlaylistNavButton').on('click',function (e){
notifyBus("openPlaylist");
if($(window).width() <= 480 && document.getElementById("sideNav").style.width == "60%"){
notifyBus("closeNav");
notifyBus("openPlaylist");
} else {
notifyBus("openPlaylist");
}
});
/*$('#playlist').on('click',function (e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment