Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
So this is jQuery's document ready structure. So these instructions won't run until the HTML file has been loaded. So inside of the document ready, the first thing we want to do once the HTML has been loaded is target the tooltip and set the mouse events. So I am going to start with a $(), two tick marks inside for a string literal, we are going to search for .tooltip. This is going to target every HTML element in our page that has a tooltip, so we can have more than one on the page. Outside of the parentheses .mouseover, beginning and ending parentheses, outside of the parentheses we are going to type .mousemove, another set of parentheses, outside of those parentheses .mouseout, then a semicolon.
So we are attaching three properties onto the tooltip, mouseover, mousemove and mouseout. Inside of each one of these parentheses, we're going to actually target the mouse event itself. So inside of each one of these parentheses, we're going to put a custom function that targets the actual event. So we are going to type function(), inside of the parentheses, we are going to put letter e, outside of the parentheses, but still inside of the parentheses for mouseover, we are going to put beginning and ending bracket.
I am going to select this first one here, let's come over here and paste this inside of each of the parentheses for mousemove and mouseout. Once we have all of these in place, let's come over here and just split these open, split each one open on the brackets, just close up some negative space. So now we have an area to put instructions in for mouseover, for mousemove and mouseout, and we'll start that in the next movie.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98081 Viewers
61 Video lessons · 85345 Viewers
71 Video lessons · 69366 Viewers
56 Video lessons · 101730 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.