ChrisWojcik / single-page-nav

jQuery plugin that provides smooth scrolling and advanced navigation for single page websites.
http://chriswojcik.net/demos/single-page-nav/
161 stars 74 forks source link

Prevents linking to other pages from the navigation #29

Closed mzhKU closed 4 years ago

mzhKU commented 5 years ago

If I apply the singlePageNav function to a navigation that also links to other pages (not just sections on the current page), then single Page nav seems to prevent accessing the other page. Is there a solution to this?

noblesilence commented 5 years ago

You can add filter:

  1. Add external class to those links in HTML code.
  2. $('#navigation-bar').singlePageNav({'filter': ':not(.external)'});

'filter' - By default, the plugin will be applied to all links within the container, use this to filter out certain links using jquery's built in filter method (e.g. ':not(.external)')

mzhKU commented 5 years ago

I had the filter active but seems not to work... seen this before?

noblesilence commented 5 years ago

Can you share your code so I can take a look?