Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cobaltapps/1176b91f5635c1ee9da794dba790dd55 to your computer and use it in GitHub Desktop.
Save cobaltapps/1176b91f5635c1ee9da794dba790dd55 to your computer and use it in GitHub Desktop.
Code for a tutorial walking through some use-case scenarios of the Dynamik Responsive Vertical Toggle Menu Shortcode feature (Part 1).
Custom Hookbox:
Name - Custom Toggle Icon
Code:
<div class="responsive-menu-icon">
<i class="fa fa-bars" aria-hidden="true"></i>
<i class="fa fa-times" aria-hidden="true" style="display:none;"></i>
</div>
JS (jQuery) Code:
jQuery(document).ready(function($) {
$('.responsive-menu-icon').click(function() {
$(this).children('.fa').toggle();
});
});
Responsive CSS Code:
Primary Menu:
.responsive-primary-menu-container .responsive-menu-icon .fa {
color: #aaa;
}
Secondary Menu:
.responsive-secondary-menu-container .responsive-menu-icon .fa {
color: #888;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment