View Full Version : Two Tab Content Scripts on one page

02-06-2011, 03:45 PM
1) Script Title:
Tab Content Script
2) Script URL (on DD):
3) Describe problem:


Edit: suppose I should start with the fact I tried removing the first script and the 2nd one still doesn't work. Even if I use identical code just diff IDs and variables.

I'm currently working on a new design for a wow-guilds web-page.
I started by using the Tab Content Script on the raid progress part which is working (as you can hopefully tell :P).
Then I want to use it again on the class-recruitment part. This however did not work. It only loads the pages on clicks but does not scroll the tabs every 2 sec as intended. It doesn't even load the first tab without clicking on it.

I've been using exactly the same sort of div and css setup (with different ids and classes of course). I even started over twice and copied everything exactly from the working tabs and content.

I've given the two scripts different variables:

The working one:

<script type="text/javascript">
var myraids=new ddtabcontent("raidtabs")

The one that doesn't work.

<script type="text/javascript">
var myklasses=new ddtabcontent("klasstabs")

Also I have trouble understanding why the first one is working now because even after I deleted the:

.raid_content {display: none;}
@media print {.raid_content {display: block !important;};}
from the css file but it keeps working.

I've also tried removing the first one but the 2nd one still doesn't work. But after literally doing it exactly as the first one 3 times I just don't get whats wrong.

Any help is appreciated, I can give you more info if you'd like.


I am aware of the header problem but I'd like to fix javascript first :)

02-06-2011, 05:44 PM
I solved with help from this