Consider the following HTML markup:
<img src="info.png" title="Password should contain 6-10 characters">
On output, when users hover over the image, the value of the title attribute is displayed in a pop-up window. It is a good idea to display information to users.
But this information disappears when users click on the image (note that users may tend to click rather than freeze)
What can I do (for example, using jQuery) to keep the information visible (even if the user clicks) until the mouse pointer over the image?
I tried the following, but this did not solve this problem:
jQuery('img[src="info.png"]').click(function(event){ event.preventDefault(); });
EDIT: Is there a way to make โclick equals hoverโ in jQuery?
siva636
source share