Created
December 9, 2015 23:34
-
-
Save lots0logs/2d3bde642e4aca3d8e0d 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
| <script> | |
| (function($) { | |
| $(document).ready(function() { | |
| setTimeout(function() { | |
| window.et_duplicate_menu = function( menu, append_to, menu_id, menu_class ){ | |
| append_to.each( function() { | |
| var $this_menu = $(this), | |
| $cloned_nav; | |
| menu.clone().attr('id',menu_id).removeClass().attr('class',menu_class).appendTo( $this_menu ); | |
| $cloned_nav = $this_menu.find('> ul'); | |
| $cloned_nav.find('.menu_slide').remove(); | |
| $cloned_nav.find('li:first').addClass('et_first_mobile_item'); | |
| $cloned_nav.find( 'a' ).on( 'click', function(){ | |
| var noop = $(this).parent().hasClass('menu-item-has-children'); | |
| $this_menu.trigger( 'click', [noop] ); | |
| } ); | |
| $this_menu.on( 'click', function( event, noop ) { | |
| if ( $(this).hasClass('closed') ){ | |
| $(this).removeClass( 'closed' ).addClass( 'opened' ); | |
| $cloned_nav.slideDown( 500 ); | |
| } else { | |
| if ( typeof noop !== 'undefined' && true === noop ) { | |
| return false; | |
| } | |
| $(this).removeClass( 'opened' ).addClass( 'closed' ); | |
| $cloned_nav.slideUp( 500 ); | |
| } | |
| return false; | |
| } ); | |
| $this_menu.on( 'click', 'a', function(event){ | |
| event.stopPropagation(); | |
| } ); | |
| } ); | |
| $('#mobile_menu .centered-inline-logo-wrap').remove(); | |
| } | |
| }, 500); | |
| }); | |
| })(jQuery); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment