Results 1 to 3 of 3

Thread: tabs counter

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

    Default tabs counter

    1) Script Title: Tab Content Script

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

    3) Describe problem:
    Hello,
    on my page I have 7 tabs. But the number from the tabs are dynamic.
    How I get with javascript the maximum number from the tabs?
    maxTabs = 6
    Last edited by ddadmin; 10-13-2008 at 08:17 PM.

  2. #2
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    better question:
    How I get the current number of tabs?

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

    Default

    Without knowing exactly what you're trying to accomplish, in general, you can get the number of tabs that toggle's a sub content within a script instance by probing the
    Code:
    instance.hottabspositions
    array's length:

    Code:
    <script type="text/javascript">
    
    var countries=new ddtabcontent("countrytabs")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    alert(countries.hottabspositions.length) //alerts 4
    
    </script>
    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
  •