0

Currently trying to bind the mouseenter or hover events for a Input tag, my code is somewhat like below

$('#details_Owner').hover(HoverIn, HoverOut);
$('#details_Owner').mouseenter(HoverIn);


$(e.srcElement)
    .parent('.column')
    .children("div")
    .each(function(item) { $(this).remove()});


d = $('<div />')
    .addClass("cstooltip")
    .text($(e.srcElement).val())
    .hide()

$(e.srcElement).parent('.column').append(d);
$(e.srcElement)
    .parent('.column')
    .children("div")
    .show()

The thing that is causing problems is when the input tag is disabled, the events don't fire, is this expected behavior?

user457485
  • 267
  • 3
  • 15

1 Answers1

1

Here is a relataed topic : Event on a disabled input

In summary :

Disabled elements don't fire mouse events. Most browsers will propagate an event originating from the disabled element up the DOM tree, so event handlers could be placed on container elements. However, Firefox doesn't exhibit this behaviour, it just does nothing at all when you click on a disabled element.

But you will find a workaround if needed on the topic mentionned above

Community
  • 1
  • 1
sdespont
  • 13,915
  • 9
  • 56
  • 97