I'm working with a div in an HTML page that I need to switch the css style of as I move the mouse throughout the page.
Is there any function I can use to constantly track the mouse location? I need to switch the particular div's css style to a different css style as soon as the mouse is at least 30 px from the top of the page. While the mouse cursor is within 30px distance from the top of the page, I want the div to have a particular style. If it is farther than 30 px from the top of the page, I want it to switch styles.
assume i have 2 different styles in my css I can switch back and forth.