jQuery-One-Page-Nav icon indicating copy to clipboard operation
jQuery-One-Page-Nav copied to clipboard

Fix cases when hash is missing or link is external

Open typeofweb opened this issue 10 years ago • 6 comments

Fixes #120 as well.

typeofweb avatar May 09 '15 10:05 typeofweb

Hi @davist11, Is it possible for you to merge this? Thank you!

rajeebbanstola avatar Jan 26 '17 08:01 rajeebbanstola

@RajeebTheGreat I think this repository is not maintained anymore, but feel free to use my fork where this issue is fixed: https://github.com/mmiszy/jQuery-One-Page-Nav

typeofweb avatar Jan 26 '17 14:01 typeofweb

This is the entire point of the filter option

davist11 avatar Jan 26 '17 15:01 davist11

How the filter option works remains unchanged, I only fixed a bug in it. Moreover I fixed #120 and took care of the scenario where link might be external.

typeofweb avatar Jan 26 '17 15:01 typeofweb

But what if someone is forced to use absolute URLs in their links?

davist11 avatar Jan 26 '17 15:01 davist11

I'm not sure what you mean by that? Clicking on an external link navigates to another website.

This has nothing to do with relative/absolute URLs. Absolute URLs work just fine as long as they're internal, not external.

For example, imagine your website address is http://davist11.co/. Any of the following hrefs are considered internal:

  • /
  • dsadsa
  • /dsadsa/dsadsa
  • abc/def
  • http://davist11.co/
  • http://davist11.co/abc
  • http://davist11.co/das/das/das/

While these are considered external:

  • http://google.com/
  • http://facebook.com/friends/
  • http://blog.davist11.com/

typeofweb avatar Jan 26 '17 15:01 typeofweb