Last active
January 3, 2016 05:49
-
-
Save srikat/8417885 to your computer and use it in GitHub Desktop.
Adding a responsive mobile menu in any iThemes Builder theme. http://sridharkatakam.com/add-responsive-mobile-menu-builder-theme/
This file contains 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
// Enqueuing and Using Custom Javascript/jQuery | |
function custom_load_custom_scripts() { | |
if ( file_exists( get_stylesheet_directory() . '/js/custom_jquery_additions.js' ) ) | |
$url = get_stylesheet_directory_uri() . '/js/custom_jquery_additions.js'; | |
else if ( file_exists( get_template_directory() . '/js/custom_jquery_additions.js' ) ) | |
$url = get_template_directory_uri() . '/js/custom_jquery_additions.js'; | |
if ( ! empty( $url ) ) | |
wp_enqueue_script( 'custom_jquery_additions', $url, array('jquery'), false, true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_load_custom_scripts' ); |
This file contains 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
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic|Merriweather:400,700,400italic,700italic,900,900italic,300italic,300); |
This file contains 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
/********************************************* | |
Mobile Navigation Menu | |
*********************************************/ | |
.it-mobile-menu { | |
display: none; | |
} |
This file contains 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
.builder-module-navigation-background-wrapper { | |
padding-top: 0.75em; | |
} | |
.builder-module-navigation.mobile .current_page_item a, | |
.builder-module-navigation.mobile .current-cat a, | |
.builder-module-navigation.mobile .current-menu-item a { | |
background: #fbef05; | |
} | |
.builder-module-navigation.mobile li a:hover, | |
.builder-module-navigation.mobile .current_page_item li a:hover, | |
.builder-module-navigation.mobile .current-cat li a li a:hover, | |
.builder-module-navigation.mobile .current-menu-item li a:hover { | |
background: #ECECEC; | |
color: #5B7E39; | |
} | |
.builder-module-navigation li li { | |
background: transparent; | |
} |
This file contains 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
/********************************************* | |
Navigation Module (Mobile/Responsive) | |
*********************************************/ | |
.builder-module-navigation.mobile { | |
} | |
.builder-module-navigation.mobile .builder-module-navigation-menu-wrapper { | |
display: inherit; | |
margin: 0; | |
} | |
.builder-module-navigation.mobile ul { | |
margin-top: .5em; | |
background: #FFFFFF; | |
} | |
.builder-module-navigation.mobile li { | |
width: 100%; | |
position: relative; | |
} | |
/* second level stuff */ | |
.builder-module-navigation.mobile li ul { | |
position: relative !important; | |
left: 0 !important; | |
border: 0; | |
width: 100%; | |
margin: 0; | |
} | |
.builder-module-navigation.mobile li a, | |
.builder-module-navigation.mobile .current_page_item li a, | |
.builder-module-navigation.mobile .current-cat li a, | |
.builder-module-navigation.mobile .current-menu-item li a { | |
margin: 0; | |
background: transparent; | |
border-color: transparent; | |
color: #3B3F42; | |
border-bottom: 1px solid rgba(0,0,0,0.1); | |
} | |
.builder-module-navigation.mobile li a:hover, | |
.builder-module-navigation.mobile .current_page_item li a:hover, | |
.builder-module-navigation.mobile .current-cat li a li a:hover, | |
.builder-module-navigation.mobile .current-menu-item li a:hover { | |
background: #423737; | |
color: #ECECEC; | |
} | |
.builder-module-navigation.mobile li li { | |
border: 0; | |
width: 100%; | |
} | |
.builder-module-navigation.mobile li ul ul { | |
margin: 0; | |
} | |
.builder-module-navigation.mobile li li a { | |
padding: .25em 0 .25em 2em; | |
line-height: inherit; | |
} | |
.builder-module-navigation.mobile li li li a { | |
padding-left: 4em; | |
} | |
.builder-module-navigation .menu.it-mobile-menu-hidden { | |
display: none; | |
} | |
.it-mobile-menu { | |
font-family: 'Source Sans Pro', 'Playfair Display', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
text-transform: uppercase; | |
color: #3B3F42; | |
padding: .25em .75em; | |
display: block; | |
cursor: pointer; | |
-webkit-font-smoothing: antialiased; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment