Code Monkey home page Code Monkey logo

Comments (6)

Aybee avatar Aybee commented on August 16, 2024

Yes, the download version 1.3.3 will not work.
Error comes from this line

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Place a jquery.min.js inside folder /js/ and change line to

<script src="js/jquery.min.js"></script>

from flexnav.

bbsemail avatar bbsemail commented on August 16, 2024

Thank you for the reply. I switched to a local copy of jQuery and get the same results on window resize:
http://dev.hcca.org/flexnav/index0.html
Am I doing something wrong? Thanks for the help. (i didn't get an email that my comment had a reply so hadn't revisited until now) I hope to use your great looking menu

from flexnav.

bbsemail avatar bbsemail commented on August 16, 2024

Follow up ... I'm guessing you directed me to use a local copy of jquery because all the menus were dropped down/expanded. The menus work and drop/slide up and down until you resize the window at which point everything gets confused. I'm not seeing any errors or warnings in Firefox's Console that would explain this.

from flexnav.

Aybee avatar Aybee commented on August 16, 2024

I hope to use your great looking menu

It's not by me.

Don't know how to fix this.

Maybe you will give this one a chance https://github.com/samikeijonen/responsive-nav.js It's a fork of arielsalminen/responsive-nav.js#178

from flexnav.

mdziadek avatar mdziadek commented on August 16, 2024

hi had the same problem, solution that works for me below, note that I put another class to li element which have ul inside, This is only for convenience in creating my template

    $(window).resize(function() {
        $('.sub-menu').hide();
    });

from flexnav.

austin350s10 avatar austin350s10 commented on August 16, 2024

I was having the same problem as well. Didn't matter what browser I was using. After resizing a few times and then hovering over a menu item the submenu would not close after moving the curser to another menu item. This results in many submenus being open at the same time. I found that the problem was in the resizer function itself. Specifically the following line:

$('.item-with-ul').find('ul').removeClass('flexnav-show');

needs to be changed to:

$('.item-with-ul').find('ul').removeClass('flexnav-show').hide();

Here is the whole resizer function with the correction:

`resizer = function() {
  var selector;
  if ($(window).width() <= 780) {
    $nav.removeClass("lg-screen").addClass("sm-screen");
    if (settings.calcItemWidths === true) {
      $top_nav_items.css('width', '100%');
    }
    selector = settings['buttonSelector'] + ', ' + settings['buttonSelector'] + ' .touch-button';
    $(selector).removeClass('active');
    return $('.one-page li a').on('click', function() {
      return $nav.removeClass('flexnav-show');
    });
  } else if ($(window).width() > 780) {
    $nav.removeClass("sm-screen").addClass("lg-screen");
    if (settings.calcItemWidths === true) {
      $top_nav_items.css('width', nav_percent);
    }
    $nav.removeClass('flexnav-show').find('.item-with-ul').on();
    $('.item-with-ul').find('ul').removeClass('flexnav-show').hide();
    resetMenu();
    if (settings.hoverIntent === true) {
      return $('.item-with-ul').hoverIntent({
        over: showMenu,
        out: resetMenu,
        timeout: settings.hoverIntentTimeout
      });
    } else if (settings.hoverIntent === false) {
      return $('.item-with-ul').on('mouseenter', showMenu).on('mouseleave', resetMenu);
    }
  }
};`

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.