toggle for drop down nav with functions.php
-
Hello!
I have put the following in functions.php (there is an error in the second line…):
function toggle_nav() {
$(‘.toggleNav’).click(function(){
// $(‘.menu-links-container ul’).toggleClass(‘open’);
$(‘.top-nav ul’).slideToggle();
});
}header.php:
<div class=”toggleNav drop-down-menu”>Menu <span class=”hamburger”>☰</span></div>
<?php add_action( ‘wp_enqueue_scripts’, ‘toggle_nav’ ); ?>and I’m getting a blank page…
Thanks in advance for any help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘toggle for drop down nav with functions.php’ is closed to new replies.