In jQuery, is it possible for an element to act like it is mouseovered automatically when the page is loading, when it is not really mouseovered? I mean, I won't put my pointer on the desired element for it to do what it would do if I put.
Use .trigger() to trigger an event.
$('#foo').trigger('mouseover');
You can call the handler directly
$('abc').mouseover();
Put the desired action in the document.ready
function as that is when you actually want the action, not on a mouse-over that doesn't happen.
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