Created
August 14, 2018 13:18
-
-
Save BHWD/4ba92525cb049c3c0885e20da1b7831c to your computer and use it in GitHub Desktop.
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(document).ready(function($) { | |
if (jQuery('body').hasClass('ie')){ | |
alert('ie'); | |
} else { | |
console.log('sub menu width'); | |
jQuery('.sub-menu').each(function() { | |
var width = 10; | |
jQuery('li', this).each(function() { | |
width += jQuery(this).outerWidth(true); | |
}); | |
jQuery(this).css('width', width); | |
}); | |
} | |
// IE Specific JS | |
if ( jQuery('body.ie').length ) { | |
console.log('dropdown icon'); | |
jQuery('.menu-item-has-children a').append(' +'); | |
} else { | |
console.log('it doesn\'t work'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment