Force menu to hamburger icon
-
Hi all,
I really need the menu to be hamburger/mobile menu on desktop not just mobile.
I thought i had done it, but it does seem to work as expected.
I modified the flash.js file and created my own flash-stu.js file. I dequeued the original and enqueued my file.
then i change the css to my required screen size.
the javascript works (i can see the changes while using the inspect tool), but other happens.
can anyone help me please?
/* menu change */ @media (max-width: 2560px){ #site-navigation .menu-toggle { cursor: pointer; display: inline-block; font-size: 20px; }} @media (max-width: 2560px){ #site-navigation, .center-logo-below-menu #site-navigation { float: right; padding: 20px 0; }} @media (max-width: 2560px){ #site-navigation .menu { background: #fff none repeat scroll 0 0; display: none; left: 0; position: absolute; top: 100%; width: 100%; z-index: 9999; padding: 0 20px; }} @media (max-width: 2560px){ #site-navigation ul li, .transparent #site-navigation ul li { float: none; margin-right: 0; padding: 0; position: relative; border-bottom: 1px solid rgba(0,0,0,0.1); }}
add_action( 'wp_enqueue_scripts', 'wpshout_dequeue_and_then_enqueue', 100 ); function wpshout_dequeue_and_then_enqueue() { // Dequeue (remove) parent theme script wp_dequeue_script( 'flash-custom' ); // Enqueue replacement child theme script wp_enqueue_script( 'flash-custom-stu', get_stylesheet_directory_uri() . '/js/flash-stu.js', array( 'jquery' ) ); }
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Force menu to hamburger icon’ is closed to new replies.