uikit / uikit

A lightweight and modular front-end framework for developing fast and powerful web interfaces
http://getuikit.com
MIT License
18.29k stars 2.32k forks source link

Off-Canvas links #1087

Closed luetn closed 9 years ago

luetn commented 9 years ago

If I use a link like href="#user/3" with off-canvas a jquery error occurs (Error: Syntax error, unrecognized expression: #user/3) Same with href="#user|3" No problems with href="#user-3" I tested it on getuikit.com/docs/offcanvas.html with href "injection" Is ist forbidden to use href="#user|3" or href="#user/3"? Thanks for all answers

malles commented 9 years ago

as a href it is not forbidden, a link can contain those characters. You're referring to other element on the page that would have to have an id like user/3, and that is forbidden. The error you get comes from selectors trying to find that element like $('user/3'), which throws an error. If you're trying to link to another page, just make the href user/3

luetn commented 9 years ago

@malles Thank you I just want to change hashtags I now ended up with href="./#user/3" (since my page is index.php) With the official off-canvas page it would be href="offcanvas.html#user/3" right?

malles commented 9 years ago

I'm not sure this is an issue. As @luetn said, just make sure the link doesn't start with #, and make it a valid link