<a href=" "> not working

46,050

Solution 1

If you disable JavaScript the link works. In ajaxtoolbar.js you have the following code:

$jq('a','.toolbar').click(function(event) {
    link    =   $jq(this).attr('href');

    if((link.search("mode=")!=-1||link.search("dir=")!=-1||link.search("price=")!=-1||link.search("p=")!=-1)&&(toolbarsend==false)){
        event.preventDefault();
        ajaxtoolbar.onSend(link,'get');
    }

    return false;

});

The return false; prevents the link from triggering.

Solution 2

Like @Benjamin Gruenbaum said, try this:

<div class="span12 category-products" style="margin: 0 auto;">
  <div class="toolbar">
    <div class="row big_with_description" style="position:relative;">
      <div class="span5 product hover">                                         
        <a href="http://www.grewal.nl/reviveme/repair/mobile.html">
         <img src="http://www.grewal.nl/reviveme/media/catalog/category/mobile2.jpg" class="category-thumbnail product-retina" width="499" height="268" alt="Mobile">
        </a>
      </div>
    </div>
  </div>
</div>

If it was your intention to link with this div, I would like to refer to this post: "Make a div into a link"

Share:
46,050
progit
Author by

progit

Updated on July 19, 2022

Comments

  • progit
    progit almost 2 years

    The following hyperlink does not work, though it works when you click open in new tab button.

    <div class="span12 category-products" style="margin: 0 auto;">
    <div class="toolbar">
        <div class="row big_with_description" style="position:relative;">                                                                   
            <a href="http://www.grewal.nl/reviveme/repair/mobile.html">
                <div class="span5 product hover">
                    <img src="http://www.grewal.nl/reviveme/media/catalog/category/mobile2.jpg" class="category-thumbnail product-retina" width="499" height="268" alt="Mobile">    
                </div>
            </a>
        </div>
    </div>
    

    I have tried using Chrome and Firefox. The live page can be seen here.

  • progit
    progit over 10 years
    thanks. can you please tell me, how did you find that?
  • Kaloyan
    Kaloyan over 10 years
    I saw the toolbar class and looked in the source for any script with the name "toolbar". And since the link works in a new window, my guess was it was a javascript issue.