• Resolved alberger1

    (@alberger1)


    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)
  • Thread Starter alberger1

    (@alberger1)

    I forgot to mention I’m using the Bones Theme. I’m suspecting I have to do something differently there but I can’t seem to find any clues, anywhere.

    Thanks for helping a frustrated beginner!

    Thread Starter alberger1

    (@alberger1)

    This helped:

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘toggle for drop down nav with functions.php’ is closed to new replies.