Hey,
So I am using Timber Theme and I have problem with adding navigation menu item with external link. Theme is One pager so it uses href="#id"
to scroll to correct section with id. I wanted to add some social links to menu, but came across a problem. Here is how I added those links:
<div class="navmenu">
<ul id="menu">
<li class="active" ><a href="#services">Services</a></li>
<li><a href="#news">News</a></li>
<li class="last"><a href="#contact">Contacts</a></li>
<li><a href="https://link" target="_blank"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://link" target="_blank"><i class="fa fa-facebook"></i></a></li>
<li><a href="https://link" target="_blank"><i class="fa fa-google"></i></a></li>
</ul>
</div>
The problem is that after adding them smooth scrolling isn't working anymore. From console I get error
Uncaught Error: Syntax error, unrecognized expression: https://link
And apparently it's from jquery-1.8.3.min
But as I understand some jquery code is looking for each id in page structure and if it can't find it, then it just crashes, because I tested whether href="#non-existing id"
would make the same problem and it did...
Could someone please help me find how to solve it?
I know I could add those links to another <ul>
outside of <ul id="menu">
or
use existing href="#contact"
and just add onclick="window.open('https://link');"
, but I am interested if there solution which would allow to stay as it is now.
Last updated
1-1 of 1