Developing software in the Real World

Dynamic JavaScript Tabs v1.0.3

Simon Hamilton contacted me about adding ids to each tab, so I did! I’ve also fixed the CSS error that Adam noticed and correctly updated the version number in the license block!

Update: I’ve created a separate page to hold the download link

5 thoughts on “Dynamic JavaScript Tabs v1.0.3

  1. error line 98 tabs.js:
    tabLink.setAttribute("href","javascript://");
    solution: tabLink.setAttribute("href","#");

    Maybe is a good idea to implement a cookie so that the tab can recall the state (useful for ajax users)

    great script!

  2. I forgot the following:
    better to remove these lines in the tabs.js
    BuildTabs('tab-container');
    ActivateTab('tab-container', 0);
    BuildTabs('tab-container-2');
    ActivateTab('tab-container-2', 0);

    and add at the end of the index.html

    window.load= new function(){
    BuildTabs('tab-container');
    ActivateTab('tab-container', 0);
    BuildTabs('tab-container-2');
    ActivateTab('tab-container-2', 0);
    }

    this must be removed to the header:

Leave a Reply to Rob... Cancel reply

Your email address will not be published. Required fields are marked *