Just a quick question about hover events, How can I send a hover event to an element without the user hovering (programmatically).
example:
// Send hover event
$('#myDiv').sendHoverEvent();
// What to do once hovering
$('#myDiv').hover(console.log('hovering'));
Try this:
$('#myDiv').trigger('mouseenter');
Hover connects two events. The one you want to trigger is mouseenter.
$('#myDiv').mouseenter();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With