Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $('#main-nav li').mouseenter(function(){
- if($(window).height() < 635){
- var currentHeight = $(window).height() - 100;
- var intConvert = currentHeight.toString();
- var heightString = intConvert.concat('px');
- $('#main-nav .sub-menu').each(function(){
- $(this).css('max-height', heightString);
- });
- }
- });
- $(window).on('resize', function(){
- if($(window).height() >= 635){
- $('#main-nav .sub-menu').each(function(){
- $(this).css('max-height', 'none');
- });
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement