To continue with our discussion on events in this mess and we'll take a look at the most enter and most
leave even the most enter event will trigger and action when the mouse pointer enters a certain proximity
of the specified each timeout element.
In this sample page we can see that an alert appears when the mouse pointer is positioned next to the
paragraph of text.
Now let's take a look at the code
in between the open and close script tag.
You can see that we begin with our document dot ready function.
Next we specify the element to apply the action to in this case p. 1 since we've used the numbers sign
in front.
We know that we're referring to an I.D. the I.D. is contained within the paragraph tags.
Here
next is our actual event known as the mouse enter event
and that's followed by the action which is the alert message box that appears in our web browser.
In addition to mouse enter we also have the most live event.
This triggers the action once the mouse has left the proximity of the specified element so if we change
mouse enter to mouse leave we'll save our file and preview this in our web browser.
We can see that the message box now appears once our mouse leaves the proximity of the element.