Giter Club home page Giter Club logo

Comments (5)

mrjasonweaver avatar mrjasonweaver commented on June 17, 2024

You'd have to make 2 separate id's for each I'm assuming instead of [role='navigation']. Tried that?

Do you have your code somewhere so I can take a look?

from flexnav.

 avatar commented on June 17, 2024

You do indeed need 2 separate id's... but both menus will still respond to a men-button click.

I changed this:

// Toggle for nav menu
$('.menu-button').click(function() {
    $this.slideToggle(settings.animationSpeed); 
});

to this:

// Use unbind to prevent the click from firing twice...
// There's probably a better way to fix that...
$('.menu-button').unbind('click').click(function() {
    // Get the .menu-button that was clicked and animate
    // the relevant menu
    $(this).next().slideToggle(settings.animationSpeed);    
});

and it worked for my purposes...

from flexnav.

mrjasonweaver avatar mrjasonweaver commented on June 17, 2024

@wmetz Nice! Thanks for sharing.

from flexnav.

mrjasonweaver avatar mrjasonweaver commented on June 17, 2024

This plugin is ideally for a global navigation. Closing this issue.

from flexnav.

 avatar commented on June 17, 2024

@wmetz I tried your approach and it broke both menu buttons. I changed the role and add the new role to the script at the bottom of the page and changed the JQuery to have your code you provide. Any suggestions of where I went wrong?

from flexnav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.