PDA

View Full Version : Tab Content Styles Question



Greg in MA
05-30-2008, 09:37 PM
1) Script Title: Tab Content v2.2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

I'm looking to create two separate styles for Tabs on the same "flowertabs" script. Is this possible?

Using this code (and creating a second class with random colors to show the difference):


<div id="flowertabs" class="menu2">
<ul>
<li><a href="#" rel="tcontent1">Japanese Tansu</a></li>
<li><a href="#" rel="tcontent2">Vietnamese Lacquer</a></li>
<li><a href="#" rel="tcontent3">Custom Upholstery</a></li>
</ul></div>



<div id="flowertabs" class="menu">
<ul>
<li><a href="#" rel="tcontent4">InStyle Magazine</a></li>
</ul></div>

Resulted in the following:

http://xs127.xs.to/xs127/08225/tabs154.png


--

However, the fourth tab ("Instyle Magazine") is not selectable, and does not display in the timed cycle.

All of the div id and class tags are entered correctly. I can move the rel="tcontent4" into the higher list under "menu2", and it cycles/activates correctly, but returns to the same style class as the other three - which I'd like to avoid.

Is there a way that I can have two separate classes for the same "tabcontent" that is selectable and cycles through everything?

Thanks for the help in advance.

ddadmin
05-31-2008, 06:22 AM
The ID of each Tab container instance should never be duplicated (you have two "flowertabs" IDs here). Just use one, and put all links that are tabs inside this DIV. Something like:


<div id="flowertabs">
<div class="menu2">
<ul>
<li><a href="#" rel="tcontent1">Japanese Tansu</a></li>
<li><a href="#" rel="tcontent2">Vietnamese Lacquer</a></li>
<li><a href="#" rel="tcontent3">Custom Upholstery</a></li>
</ul>
</div>

<div class="menu">
<ul>
<li><a href="#" rel="tcontent4">InStyle Magazine</a></li>
</ul>
</div>
</div>

That's the general idea anyway.

Greg in MA
05-31-2008, 02:43 PM
Doing that, I end up back at square one:

http://xs127.xs.to/xs127/08226/vietjap868.png

Wouldn't creating another "flowertabs" alias (ie flower2) make an entirely new content area?

Greg in MA
05-31-2008, 07:47 PM
Played around with the code a little bit, and was able to figure it out thanks to your code block.

Thanks!