Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide hidden links & remove the overlay when one is clicked #5042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karmaniverous
Copy link

This is a bug fix.

Summary

When a "hidden" nav bar link is clicked in a mobile view, the overlay doesn't go away. You'll only notice if the link is to an on-page location.

See this video for a walkthrough of the issue and an easy front-end fix. The script in the fix looks like this:

$(function () {
  var $btn = $("nav.greedy-nav .greedy-nav__toggle");
  var $hlinks = $("nav.greedy-nav .hidden-links");

  // Window listeners
  $hlinks.on("click", function () {
    $hlinks.addClass("hidden");
    $btn.removeClass("close");
  });
});

This PR applies the fix directly to the plugin code.

Context

See issue #4537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant