Changing page elements on mouse hover

jQuery provides many ways to bind mouse event handlers that can give the jQuery developer more control and flexibility than CSS pseudo classes such as :hover. These event handlers make it possible to create a rich and interactive user experience based on user actions.

Note

With the release of jQuery 2.0, jQuery no longer officially supports earlier browsers such as IE6, IE7, and IE8. However, methods such as .hover() can still provide benefits that will allow you to support earlier versions of browsers. Be wary, however, that some parts of the jQuery library may no longer work.

Getting ready

To demonstrate the mouse hover event, we need to firstly create a blank HTML document. Create recipe-7.html in an easily ...

Get jQuery 2.0 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.