sushil bharwani sushil bharwani - 12 days ago 5x
HTML Question

Hover not working on disabled input field?

I have a disabled input field on hover of which i want to do a popup which says this field will be automatically populated.

<input type="text" class="dcol" data-toggle="popover" data-content="Required Field with Numeric Input" disabled="disabled" style="background-color:#FFFF66" value="">

Here is my jQuery which is not working.


Can anyone suggest how I can achieve this.


The mouse event will not get fired on the disabled field. What you can do is put an element in front of the disabled field and put your mouse event on that element.

This will tell you exactly how to do it

However, other thing you can do is keep the field enabled and on hover over, disable it and show the alert message. Like:


I have created a fiddle for it. You can check it out here.