Koen Molemans
Koen Molemans

Reputation: 11

link fails to open when clicked on

on a site i am making for my hobby i have the following problem. The menu that is on top of the site has 4 items in it. 3 of them point to an anchor on the main page but the 4th points to an external page.

However the 4th one does not work when clicked. When you click it nothing happens, when you right click it and choose open in new tab or open in new window then it opens the page it needs to open in that new tab or window.

But the usual left click does not do anything.

The code i use for the menu is the following:

<!-- Nav Starts -->
            <div class="navbar-collapse  collapse">
              <ul class="nav navbar-nav navbar-right scroll">
                <li class="active"><a href="#home">Home</a></li>
                <li><a href="#about">About</a></li>
                <li><a href="#works">Works</a></li>
                <li><a target="_top" href="http://www.vignorama.be/blog/index.html">Blog</a></li>
                <li><br>
                </li>
                <li><br>
                </li>
              </ul>
            </div>
            <!-- #Nav Ends -->

It propably is something stupid i am overlooking, but its something i am breaking my head about for 2 days allready

Who can help me solve my problem?

Upvotes: 0

Views: 527

Answers (2)

dokgu
dokgu

Reputation: 6030

My best bet is that you have a Javascript or Jquery onClick event handler where you are doing something like

e.preventDefault();

which prevents the loading of the page.

I think that's what you're doing since the other links are navigation links. That's my best bet.

EDIT

Okay it seems that my guess was correct. Here's what you could do:

  1. Add a class to your external link <li><a target="_top" class="external" href="http://www.vignorama.be/blog/index.html">Blog</a></li>
  2. On your Javascript / Jquery check if the link has this class and if it does don't do the e.preventDefault();.

Jquery

$("a").click(function(e) {
  if(!$(this).hasClass("external")) {
    e.preventDefault();
  }
  // Your other codes
});

Upvotes: 2

Joshua
Joshua

Reputation: 822

It is most likely just do to your internet connection or the websites server connection at the time, because the link is working for everyone else currently.

Upvotes: 0

Related Questions