Adding the jQuery document ready


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

Adding the jQuery document ready

Now we're ready to start working in our JavaScript file. I'm going to come out of Live view in Dreamweaver here. You might see that the Design view looks a little messy. What's happening here is all those panels are rendering on top of each other since they have absolute-positioned properties. So from the File menu, let's choose Open, let's go into the mySlidingPanels, let's go into includes, and let's open sliding_panels.js. So inside here we can start writing our JavaScript file. I am going to add a few extra returns in here. And so what we're going to start with is we want to declare a variable, so we're going to type var panelWidth.

We're going to set that equal to 0, then a semicolon. So throughout the script, we're going to refer back to this global variable, so that if we change the width of the panel in CSS, we don't have to go back and change our JavaScript. Our JavaScript will always go back and reference the panelWid...

Adding the jQuery document ready
Video duration: 2m 35s 1h 6m Intermediate

Viewers:

Adding the jQuery document ready provides you with in-depth training on Developer. Taught by Chris Converse as part of the Create a Sliding Tabbed Panel with jQuery and Dreamweaver

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