elboletaire/tabbedcontent

View on GitHub

Showing 4 of 4 total issues

Function Tabbedcontent has 194 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var Tabbedcontent = function(tabcontent, options) {
    var defaults = {
        links         : tabcontent.prev().find('a').length ? tabcontent.prev().find('a') : '.tabs a', // the tabs itself. By default it selects the links contained in the previous wrapper or the links inside ".tabs a" if there's no previous item
        errorSelector : '.error-message', // false to disable
        speed         : false, // speed of the show effect. Set to null or false to disable
Severity: Major
Found in src/tabbedcontent.js - About 7 hrs to fix

    Function init has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function init() {
          // Switch to tab using location.hash
          if (tabExists(loc.hash)) {
            // Switch to current hash tab
            switchTab(loc.hash);
    Severity: Minor
    Found in src/tabbedcontent.js - About 1 hr to fix

      Function switchTab has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function switchTab(tab, api) {
            if (!tab.toString().match(/^#/)) {
              tab = '#' + getTab(tab).tab.attr('id');
            }
      
      
      Severity: Minor
      Found in src/tabbedcontent.js - About 1 hr to fix

        Function getTab has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function getTab(tab) {
              if (tab instanceof $) {
                return {
                  tab : tab,
                  link : options.links.eq(tab.index())
        Severity: Minor
        Found in src/tabbedcontent.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language