Assigning a selected state to the tab clicked


show more Assigning a selected state to 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 ...

Assigning a selected state to the tab clicked

Now we are going to modify our custom function to make sure that the tab we clicked on shows in its selected state. So let's come out of Live view. Let's come back to our sliding_panels.js. Now, still inside of the changePanels function, after the panel_container animation, let's add a few lines. Start with a dollar sign, parentheses, tick marks inside for a string literal .sp, space, .tabs space span, outside of the parentheses .removeClass, another set of parentheses, semicolon, inside of the parentheses for removeClass tick marks for a string literal. Type selected.

So, every time we click one of the tabs, we are going to take that selected class of all of them and then we want to add it back onto the one that was clicked. So on the next line dollar sign, parentheses, tick marks for a string literal .sp, space, .tabs, space, span, colon, nth-child, another set of parentheses, inside of the parentheses for nth-child, two tick marks, two plus signs.

We are going to c...

Assigning a selected state to the tab clicked
Video duration: 3m 9s 1h 6m Intermediate

Viewers:

Assigning a selected state to 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 ...