Results 1 to 2 of 2

Thread: "selected" class not working

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default "selected" class not working

    1) Script Title: Tab Content Script (v 2.1)

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

    3) Describe problem: Script is working very well, except the link that is designated with the "selected" class is not being used as default when the page loads. Instead the 1st tab always shows.

    URL to my site: Quarterlives (It's the section with "WTF," "10," and "WWW")

    Code for the links:
    Code:
                <div class="tabbuttons">            
                    <div id="countrytabs">                
                        <a id="wtf" href="#" rel="country1">&nbsp;</a>
                        <a id="topten" href="#" rel="country2" class="selected">&nbsp;</a>
                        <a id="www" href="#" rel="country3">&nbsp;</a>                
                    </div>           
                </div>
    I have tried adding "linkparent" to "countries.setselectedClassTarget" in the code just under the tab content containers - then adding divs around the tab links, with one having the "selected" class. It did not work. Is there anything I'm missing, and how can I get the "selected" functionality to work?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmmm at a glance everything checks out OK as far as your installation of the script. I see the problem you're describing. There are a few JavaScript errors thrown from some of the other scripts on your page not related to Tab Content script, such as:

    Code:
    Error: this.$events[type].keys has no properties
    Source File: http://www.quarterlives.com/wp-content/plugins/content-gallery/scripts/mootools.v1.11.js
    Line: 3
    My guess is when the browser encountered those errors, it halts/ disrupts the execution of Tab Content script as well. To confirm this, create a page stripped of all other scripts except Tab Content script, and see if that fixes the problem. Then slowly add back the other scripts to see which one is at fault.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •