Pregunta

I am amending this post because I didnt give enough info. Here is the link to the page http://www.pinkequine.com/shop/mattes.php

I wanted to be able to - on changing - the select button Product which has a DIV ID of productordered to reset the tabbed panel with a Div ID of TabbedPanels1

to this particular panel as TabbedPanelSelected each time the product changes.

<li class="TabbedPanelsTab 0 TabbedPanelsTabSelected" tabindex="0">Sheepskin</li>

I tried this but its not working

$(".0").addClass("#TabbedPanelsTabSelected");
$(".1,.2,.3,.4,.5,.6").removeClass("#TabbedPanelsTabSelected");
¿Fue útil?

Solución

Remove the # signs from your addClass and removeClass

$(".0").addClass("TabbedPanelsTabSelected");
$(".1,.2,.3,.4,.5,.6").removeClass("TabbedPanelsTabSelected");

The # signs are for when you are going after an element with its ID tag

<div id="MyDiv"></div>

addClass and removeClass are for going after an element with its class element

<div class="SomeClass"></div>

In your case you are not using IDs, and do not want to. Just remove the # signs.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top