Tuesday, 28 January 2020

Display an alert box on mouse enter in jQuery

The following jQuery code is designed to create an alert dialogue box in the browser when the mouse passes over a particular element on the webpage.
Screenshot of mouse over alert box
Screenshot of mouse-over alert box
In this example we assign the 'id' p1 to the paragraph element so that we can target it for the 'mouseenter' action. We then create an 'alert' message box in the browser with some custom text.

Display an alert box on mouse enter in jQuery

No comments:

Post a Comment