Animating the panels based on the tab clicked


show more Animating the panels based on the tab clicked 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 ...

Animating the panels based on the tab clicked

Now that we have a click event assigned to all of the spans inside of the tabs container that call a function called changePanels, let's come up here and copy this function name. Let's come down on our script. Make sure we're outside of the document ready for jQuery. Let's type function, space. Let's paste in that function name, beginning and ending parentheses, beginning and ending bracket. Let's split that open on the brackets. Now when we call this changePanels function we're also sending a parameter.

Inside of here we're sending this.index, so this is going to be passed here into our variable that we're going to define inside of the parentheses. Let's just call this newIndex. So now inside of this function, let's hit few returns. We want to first declare a variable. We are going to type var. We are going to set newPanelPosition. We're going to set this equal to--let's type parentheses. Inside we're going to type windo...

Animating the panels based on the tab clicked
Video duration: 6m 17s 1h 6m Intermediate

Viewers:

Animating the panels based on the tab clicked 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 ...