Last active
October 21, 2016 09:16
-
-
Save vikrantnegi/cbfaa04adf8f71986d2131e213b2ccb1 to your computer and use it in GitHub Desktop.
Resize div according to window size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(window).resize(function(){ | |
resizeNav(); | |
}); | |
resizeNav(); | |
function resizeNav(){ | |
var windowWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); | |
if(windowWidth < 767) { | |
console.log('here'); | |
var w = windowWidth - 30; | |
jQuery('.languageswitcherload .nav-child.dropdown-menu.mega-dropdown-menu').css('width', w); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment