I have an href function in my php file. I use it as anchor.attr(‘href’) in my js file to show a large version of an image when someone rolls over a thumbnail of the image. That works fine. The problem is that if someone clicks on the large version now being displayed, it replaces my php file with a file containing the large image. I want it to do nothing.
I have tried using something else in the js for the anchor.attr like name and title but it is executing an img statement and requires the href to function.
If i put href’#”, the anchor.attr errors off because there is no file there to execute against.
Is there a way to allow the usage of the href for the js function but not open a new window with the image in it when clicked.
Thanks for your help with this.
or you can use the javascript
return falseto stop anchor tag from redirecting