metreex-analysis.js
/**
 * Handles the opening of tabs in the page's header. Requires being called from an HTML event such as 'onclick',
 * in order to properly hide all tabs of the same class.
 * @param {Event} event Event object passed by browser
 * @param {String} tabName HTML Id of tab to be displayed.
 */
Handles the opening of tabs in the page's header. Requires being called from an HTML event such as 'onclick',
in order to properly hide all tabs of the same class.
@param {Event} event Event object passed by browser
@param {String} tabName HTML Id of tab to be displayed.
Handles the opening of tabs in the page ' s header . Requires being called from an HTML event such as ' onclick ' in order to properly hide all tabs of the same class . @param { Event } event Event object passed by browser @param { String } tabName HTML Id of tab to be displayed .
function openTab(event, tabName){
    var i,
        metricTabContent = document.getElementsByClassName(event.currentTarget.className + "Content"),
        headerTabs = document.getElementsByClassName(event.currentTarget.className);
    for (i = 0; i < metricTabContent.length; i++){
        metricTabContent[i].style.display = "none";
    }
    for (i = 0; i < headerTabs.length; i++){
        headerTabs[i].className = headerTabs[i].className.replace(" active", "");
    }
    document.getElementById(tabName).style.display = "block";
    event.currentTarget.className += " active";
}
function openTab ( event , tabName ) { var i , metricTabContent = document . getElementsByClassName ( event . currentTarget . className + "Content" ) , headerTabs = document . getElementsByClassName ( event . currentTarget . className ) ; for ( i = 0 ; i < metricTabContent . length ; i ++ ) { metricTabContent [ i ] . style . display = "none" ; } for ( i = 0 ; i < headerTabs . length ; i ++ ) { headerTabs [ i ] . className = headerTabs [ i ] . className . replace ( " active" , "" ) ; } document . getElementById ( tabName ) . style . display = "block" ; event . currentTarget . className += " active" ; }
Handles the opening of tabs in the page's header.
Handles the opening of tabs in the page ' s header .