Here is what I have:
.error
{
background: url(error.jpg) no-repeat right top;
}
and via JQuery I give or take the class “error” to a textbox. So, the textbox has the image as a background, but not the whole textbox, but only its right part. What I now want to make is on hover on the image (not the textbox) to show title of the image. How to add title to the image and how to make its on hover event?
Because the image is part of the background of the input, you can’t attach events to it.
You can however place an
altortitleattribute on theinputitself which will act like a tooltip in all browsers.