js/jquery.responsiveTabs.js
function(e) {
            var current = _this._getCurrentTab(); // Fetch current tab
            var activatedTab = e.data.tab;

            e.preventDefault();

            // Trigger click event for whenever a tab is clicked/touched even if the tab is disabled
            activatedTab.tab.trigger('tabs-click', activatedTab);

            // Make sure this tab isn't disabled
            if(!activatedTab.disabled) {

                // Check if hash has to be set in the URL location
                if(_this.options.setHash) {
                    // Set the hash using the history api if available to tackle Chromes repaint bug on hash change
                    if(history.pushState) {
                        // Fix for missing window.location.origin in IE
                        if (!window.location.origin) {
                            window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
                        }
                        
                        history.pushState(null, null, window.location.origin + window.location.pathname + window.location.search + activatedTab.selector);
                    } else {
                        // Otherwise fallback to the hash update for sites that don't support the history api
                        window.location.hash = activatedTab.selector;
                    }
                }

                e.data.tab._ignoreHashChange = true;

                // Check if the activated tab isnt the current one or if its collapsible. If not, do nothing
                if(current !== activatedTab || _this._isCollapisble()) {
                    // The activated tab is either another tab of the current one. If it's the current tab it is collapsible
                    // Either way, the current tab can be closed
                    _this._closeTab(e, current);

                    // Check if the activated tab isnt the current one or if it isnt collapsible
                    if(current !== activatedTab || !_this._isCollapisble()) {
                        _this._openTab(e, activatedTab, false, true);
                    }
                }
            }
        }
function(e) {
            var current = _this._getCurrentTab(); // Fetch current tab
            var activatedTab = e.data.tab;

            e.preventDefault();

            // Trigger click event for whenever a tab is clicked/touched even if the tab is disabled
            activatedTab.tab.trigger('tabs-click', activatedTab);

            // Make sure this tab isn't disabled
            if(!activatedTab.disabled) {

                // Check if hash has to be set in the URL location
                if(_this.options.setHash) {
                    // Set the hash using the history api if available to tackle Chromes repaint bug on hash change
                    if(history.pushState) {
                        // Fix for missing window.location.origin in IE
                        if (!window.location.origin) {
                            window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
                        }
                        
                        history.pushState(null, null, window.location.origin + window.location.pathname + window.location.search + activatedTab.selector);
                    } else {
                        // Otherwise fallback to the hash update for sites that don't support the history api
                        window.location.hash = activatedTab.selector;
                    }
                }

                e.data.tab._ignoreHashChange = true;

                // Check if the activated tab isnt the current one or if its collapsible. If not, do nothing
                if(current !== activatedTab || _this._isCollapisble()) {
                    // The activated tab is either another tab of the current one. If it's the current tab it is collapsible
                    // Either way, the current tab can be closed
                    _this._closeTab(e, current);

                    // Check if the activated tab isnt the current one or if it isnt collapsible
                    if(current !== activatedTab || !_this._isCollapisble()) {
                        _this._openTab(e, activatedTab, false, true);
                    }
                }
            }
        }
function ( e ) { var current = _this . _getCurrentTab ( ) ; // Fetch current tab var activatedTab = e . data . tab ; e . preventDefault ( ) ; // Trigger click event for whenever a tab is clicked/touched even if the tab is disabled activatedTab . tab . trigger ( 'tabs-click' , activatedTab ) ; // Make sure this tab isn't disabled if ( ! activatedTab . disabled ) { // Check if hash has to be set in the URL location if ( _this . options . setHash ) { // Set the hash using the history api if available to tackle Chromes repaint bug on hash change if ( history . pushState ) { // Fix for missing window.location.origin in IE if ( ! window . location . origin ) { window . location . origin = window . location . protocol + "//" + window . location . hostname + ( window . location . port ? ':' + window . location . port : '' ) ; } history . pushState ( null , null , window . location . origin + window . location . pathname + window . location . search + activatedTab . selector ) ; } else { // Otherwise fallback to the hash update for sites that don't support the history api window . location . hash = activatedTab . selector ; } } e . data . tab . _ignoreHashChange = true ; // Check if the activated tab isnt the current one or if its collapsible. If not, do nothing if ( current !== activatedTab || _this . _isCollapisble ( ) ) { // The activated tab is either another tab of the current one. If it's the current tab it is collapsible // Either way, the current tab can be closed _this . _closeTab ( e , current ) ; // Check if the activated tab isnt the current one or if it isnt collapsible if ( current !== activatedTab || ! _this . _isCollapisble ( ) ) { _this . _openTab ( e , activatedTab , false , true ) ; } } } }
Define activate event on a tab element
Define activate event on a tab element