Results 1 to 2 of 2

Thread: Ajax Tabs Content - "selected" class applied incorrectly

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

    Unhappy Ajax Tabs Content - "selected" class applied incorrectly

    1) Script Title:
    Ajax Tabs Content Script (v 2.2)

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

    3) Describe problem:

    Hi,

    I've set up this script and got it working perfectly except for one small problem. When I click on a tab which isn't the default tab all the tab's classes are set to "selected" (apart from the default tab).

    This means that all the tabs apart from the default appear in their selected state. Only the tab I clicked on should be give class="selected".

    Here is my code:

    PHP Code:

    <div id="primary_box_content">

    // Default Content Here

    </div><!-- primary_box_content -->

    <
    ul class="primary_tabs" id="primaryTabs">
        <
    li><a id="tab1" class="selected" rel="#default" href="#">News</a></li>
        <
    li><a id="tab2" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">Features</a></li>
        <
    li><a id="tab3" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">City Guides</a></li>
        <
    li><a id="tab4" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">Places</a></li>
    </
    ul>

    <
    script type="text/javascript">
        var 
    primary=new ddajaxtabs("primaryTabs""primary_box_content");
        
    primary.setpersist(true);
        
    primary.setselectedClassTarget("link");
        
    primary.init(5000);
    </script> 

    So when I click one of the links, either Features, City Guides or Places, this is what I get:

    HTML Code:
    <ul class="primary_tabs" id="primaryTabs">
        <li><a id="tab1" class="" rel="#default" href="#">News</a></li>
        <li><a class="selected" id="tab2" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">Features</a></li>
        <li><a class="selected" id="tab3" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">City Guides</a></li>
        <li><a class="selected" id="tab4" rel="primary_box_content" href="/wp-content/themes/embrace/template_elements/cityguide_ajax.php">Places</a></li>
    </ul>

    Where are all three anchors in the selected state ??

    Thanks,
    Oli

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

    Default

    Hmmm I see no reason why this would happen. Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

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
  •