Jump to content

Trouble with links in nav-container


grahamc90

Recommended Posts

Hi all

 

I'm fairly new to html so bare with me...

 

I have several restaurant websites, adapted from a template. I'll use this one as an example: http://feastaway.com/basic/

 

You'll see there is a navigation bar, with links to 'Welcome', 'Contact Us', 'Opening Times' and 'View Menu'. The first three are internal links to that section of the page and work like a dream. The fourth one, 'View Menu', is an external link which is supposed to open up a new tab, but when you click it all that happens is it becomes highlighted. It doesn't open the new tab or indeed the link in the existing tab. However, right-clicking and choosing 'open link in new tab' does the trick, so it obviously knows the link is there.

 

Source code:

 

</header>

<nav id="navigation">

<div class="nav-container">

<ul>

<li><a class="active" href="#welcome">Welcome</a></li>

<li><a href="#contact">Contact <span class="extrabold">Us</span></a></li>

<li><a href="#times">Opening <span class="extrabold">Times</span></a></li>

<li><a href="http://feastaway.com/Campaigns/redir.php?ID=182" target="_blank">View <span class="extrabold">Menu</span></a></li>

</ul>

</div><!-- end .nav-container -->

</nav>

 

Any ideas!?

 

Many thanks

 

Graham

Link to comment
Share on other sites

It looks as though, the javascript code for the first three, basically a bookmark anchor that takes you specific area of the page is preventing the normal link from doing its normal default operation of taking you to the link specified in href attribute.

 

Looking at jquery code it has a filter not to target elements with class="external", so try adding this class to external link

Link to comment
Share on other sites

It looks as though, the javascript code for the first three, basically a bookmark anchor that takes you specific area of the page is preventing the normal link from doing its normal default operation of taking you to the link specified in href attribute.

 

Looking at jquery code it has a filter not to target elements with class="external", so try adding this class to external link

Thanks for the quick response - worked a treat :good:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...