Adding the jQuery document ready and mouse events


show more Adding the jQuery document ready and mouse events provides you with in-depth training on Developer. Taught by Chris Converse as part of the Create a Tooltip with jQuery show less
please wait ...

Adding the jQuery document ready and mouse events

Now at this point we're ready to start writing some JavaScript. So let's open up the JavaScript file. From your text editor, go to File > Open. From the myTooltip folder, let's go into includes, and let's open up tooltip.js. So inside of here, we are going to write some jQuery to target that tooltip and then change the tooltip container content. So let's start by putting in jQuery's document ready, so that's $(), type in the word document inside of the parentheses, outside of the parentheses we are going to type .ready(); inside of the parentheses for ready, we are going to type function, another set of parentheses, beginning and ending bracket. Let's split the brackets open.

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 st...

Adding the jQuery document ready and mouse events
Video duration: 2m 46s 54m 23s Intermediate

Viewers:

Adding the jQuery document ready and mouse events provides you with in-depth training on Developer. Taught by Chris Converse as part of the Create a Tooltip with jQuery

Subjects:
Developer Web
Software:
jQuery
Author:
please wait ...