Reputation: 47
I am trying to work out a <a href ></a>
, but it is not working when the user clicks in the left mouse button, but it will work perfectly when try to open in new tab or new window using right click option. I have used the following code
<a href="http://www.wdmarketplace.com/itempage.php?pkey=<?php echo $products['productkey']; ?>">
<img src="viewimage.php?key=<?php echo $products['thumbnail']; ?>" alt="<?php echo $products['listitemname']; ?>" />
</a>
Upvotes: 0
Views: 3212
Reputation: 1642
Use this simple code (works in google chrome, mobile view)
<a href="http://google.com/" onclick="location.replace('http://google.com/'),'_top'">Google</a>
Upvotes: 0
Reputation: 75
I found this to be the problem in one of the js files for my application:
$('section [href^=#]').click(function (e) {
e.preventDefault()
})
Upvotes: 0
Reputation: 52635
You have the following jquery code in your web page, which prevents the click from loading the new page.
$('#nav .thumb a').click(function(){
$('#changeImg').fadeTo(0.5,700);
$('#changeImg').attr('src',$(this).attr('href'));
return false;
});
Upvotes: 3