1 00:00:00,570 --> 00:00:05,610 To continue with our discussion on events in this mess and we'll take a look at the most enter and most 2 00:00:05,610 --> 00:00:12,600 leave even the most enter event will trigger and action when the mouse pointer enters a certain proximity 3 00:00:12,690 --> 00:00:14,680 of the specified each timeout element. 4 00:00:15,880 --> 00:00:21,520 In this sample page we can see that an alert appears when the mouse pointer is positioned next to the 5 00:00:21,520 --> 00:00:32,370 paragraph of text. 6 00:00:32,400 --> 00:00:33,630 Now let's take a look at the code 7 00:00:37,920 --> 00:00:40,430 in between the open and close script tag. 8 00:00:40,480 --> 00:00:45,440 You can see that we begin with our document dot ready function. 9 00:00:45,460 --> 00:00:53,310 Next we specify the element to apply the action to in this case p. 1 since we've used the numbers sign 10 00:00:53,310 --> 00:00:53,970 in front. 11 00:00:53,970 --> 00:00:59,600 We know that we're referring to an I.D. the I.D. is contained within the paragraph tags. 12 00:00:59,670 --> 00:01:00,030 Here 13 00:01:05,380 --> 00:01:09,660 next is our actual event known as the mouse enter event 14 00:01:13,130 --> 00:01:20,180 and that's followed by the action which is the alert message box that appears in our web browser. 15 00:01:20,180 --> 00:01:24,860 In addition to mouse enter we also have the most live event. 16 00:01:24,860 --> 00:01:32,310 This triggers the action once the mouse has left the proximity of the specified element so if we change 17 00:01:32,310 --> 00:01:41,980 mouse enter to mouse leave we'll save our file and preview this in our web browser. 18 00:01:53,630 --> 00:02:01,510 We can see that the message box now appears once our mouse leaves the proximity of the element.