Jump to content
grahamc90

Trouble with links in nav-container

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

Share this post


Link to post
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

Share this post


Link to post
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:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...