astralaaron Posted February 2, 2016 Share Posted February 2, 2016 Is there a way to do this in jquery?: There are hidden elements on my page, and they show up once a button is pressed. I need for the mouse over / hover to be activated for an element if the mouse is sitting over the top of it when that button is pressed. Before the button is pressed, the element has display:none (must be like that so elements underneath can be accessed by the mouse, and pointer-events is not an option because of browser compatibility requirements). Then the button is pressed, display:none goes away and the element appears. However, hover event doesn't fire off until the mouse moves if the mouse is already sitting on an element. Any suggestions? Thank you Link to comment Share on other sites More sharing options...
justsomeguy Posted February 2, 2016 Share Posted February 2, 2016 That's normal, I guess you would have to try to get the position of the mouse cursor, determine if it is over the elements you're looking for, and manually fire the hover event. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now