Sha256: 9ad2cadc99a96f823ec035b93fe85a575cd53a5e5c2cff467ead4ec65e44bc4c

Contents?: true

Size: 573 Bytes

Versions: 36

Compression:

Stored size: 573 Bytes

Contents

$(function() {
  var makeActive = function ($el) {
    $el.addClass('active').siblings().removeClass('active');
  }

  var showTab = function ($el) {
    target = $($el.data().target);
    makeActive($el);
    makeActive(target);
  }


  hz_tabs = $('.tabs.horizontal li')
  hz_tabs.css('width', (1/hz_tabs.length * 100)+"%");

  $('.tabs .tab-anchor').click(function (e) {
    // don't do anything if the click was in an input
    if (e.target.tagName === "INPUT") {
      e.stopPropagation();
    } else {
      e.preventDefault();
      showTab($(this));
    }
  });
});

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
atlas_assets-0.8.13 lib/assets/javascripts/tabs.js
atlas_assets-0.8.12 lib/assets/javascripts/tabs.js
atlas_assets-0.8.11 lib/assets/javascripts/tabs.js
atlas_assets-0.8.10 lib/assets/javascripts/tabs.js
atlas_assets-0.8.9 lib/assets/javascripts/tabs.js
atlas_assets-0.8.8 lib/assets/javascripts/tabs.js
atlas_assets-0.8.7 lib/assets/javascripts/tabs.js
atlas_assets-0.8.6 lib/assets/javascripts/tabs.js
atlas_assets-0.8.5 lib/assets/javascripts/tabs.js
atlas_assets-0.8.4 lib/assets/javascripts/tabs.js
atlas_assets-0.8.3 lib/assets/javascripts/tabs.js
atlas_assets-0.8.2 lib/assets/javascripts/tabs.js
atlas_assets-0.8.1 lib/assets/javascripts/tabs.js
atlas_assets-0.8.0 lib/assets/javascripts/tabs.js
atlas_assets-0.7.3 lib/assets/javascripts/tabs.js
atlas_assets-0.7.2 lib/assets/javascripts/tabs.js
atlas_assets-0.7.1 lib/assets/javascripts/tabs.js
atlas_assets-0.7.0 lib/assets/javascripts/tabs.js
atlas_assets-0.6.10 lib/assets/javascripts/tabs.js
atlas_assets-0.6.9 lib/assets/javascripts/tabs.js