Results 1 to 2 of 2

Thread: Two Ajax Tabs Content script on same page

  1. #1
    Join Date
    Dec 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two Ajax Tabs Content script on same page

    1) Script Title: Tab Content Script

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

    3) Describe problem: Im trying to put two ajax tabs in on page but with different css (layout). There is a conflict between two tabs. When I recall to click an tabs change also in other tab.

    So, is there a solution two have two .js and two css for each tab? Or what code I need to change in js file to have not a conflict between js 's file.

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

    Default

    Make sure the HTML for each Ajax Tabs contain unique IDs. The below HTML is for two Ajax Tab Contents on the same page:

    Code:
    <ul id="maintab" class="shadetabs">
    <li><a href="external.htm" rel="ajaxcontentarea">Bird</a></li>
    <li><a href="external2.htm" rel="ajaxcontentarea">Dog</a></li>
    
    </ul>
    
    <div id="ajaxcontentarea" class="contentstyle">
    <p>Default Content...</p>
    </div>
    
    <ul id="newstab" class="shadetabs">
    <li><a href="local.htm" rel="newscontentarea">Local</a></li>
    <li><a href="world.htm" rel="newscontentarea">World</a></li>
    
    </ul>
    
    <div id="newscontentarea" class="contentstyle">
    <p>Default Content...</p>
    </div>
    
    <script type="text/javascript">
    startajaxtabs("maintab", "newstab")
    </script>

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
  •