What is that doing? It is adding an HREF, TITLE and REL attribute to the image that was clicked - if you look in the console you will see that it is in fact doing exactly that.
I come back to my opening question - what were you expecting it to do?
Hi,
I'm using Visual Studio 2013 asp.net. Thi.s jQuery code script is embedded in a subpage of asp.net
Should I try putting it in the master page in the <head> section?
I didn't get any error. Nothing happened when I clicked on the image icon.
What I need is for the code to add a url address to user's bookmarks (or favorites) when the image icon is clicked.
Yes, I have reference to jQuery library.
lapucca
ASKER
Or, is it not working because I'm using an image instead of an anchor tag? If I use an anchor tag, is there an image attribute that I can use for it?
Thank you,
Did you read the information on the link I posted?
I asked some questions in my previous post about your expectations of the code - if you look at the code it does not do what you think.
When you click the image - right click it and then Inspect Element - check to see weather the href / title and rel attributes have been changed - if they have the code is working as expected.
All this does is change the attributes of a link and then removes the event handler on the link
I know what you are expecting but I don't think you are going to find a comprehensive solution - the code above does not appear to address your problem.
You referencing jQuery?