Sha256: 0a374f249fc772add78ac8b07b36bfff3e17b6f97cdf645472f00c83b7fc431e

Contents?: true

Size: 1.07 KB

Versions: 11

Compression:

Stored size: 1.07 KB

Contents

$(document).ready(function() {
  $(".js-vertical-tab-content").hide();
  $(".js-vertical-tab-content:first").show();

  /* if in tab mode */
  $(".js-vertical-tab").click(function(event) {
    event.preventDefault();

    $(".js-vertical-tab-content").hide();
    var activeTab = $(this).attr("rel");
    $("#"+activeTab).show();

    $(".js-vertical-tab").removeClass("is-active");
    $(this).addClass("is-active");

    $(".js-vertical-tab-accordion-heading").removeClass("is-active");
    $(".js-vertical-tab-accordion-heading[rel^='"+activeTab+"']").addClass("is-active");
  });

  /* if in accordion mode */
  $(".js-vertical-tab-accordion-heading").click(function(event) {
    event.preventDefault();

    $(".js-vertical-tab-content").hide();
    var accordion_activeTab = $(this).attr("rel");
    $("#"+accordion_activeTab).show();

    $(".js-vertical-tab-accordion-heading").removeClass("is-active");
    $(this).addClass("is-active");

    $(".js-vertical-tab").removeClass("is-active");
    $(".js-vertical-tab[rel^='"+accordion_activeTab+"']").addClass("is-active");
  });
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shibori-1.9.0 source/js/vendor/vertical-tabs.js
shibori-1.8.0 source/js/vendor/vertical-tabs.js
shibori-1.7.1 source/js/vendor/vertical-tabs.js
shibori-1.7.0 source/js/vendor/vertical-tabs.js
shibori-1.6.0 source/js/vendor/vertical-tabs.js
shibori-1.5.1.beta1 source/js/vendor/vertical-tabs.js
shibori-1.5.0 source/js/vendor/vertical-tabs.js
shibori-1.4.0 source/js/vendor/vertical-tabs.js
shibori-1.3.0 source/js/vendor/vertical-tabs.js
shibori-1.3.0.beta1 source/js/vendor/vertical-tabs.js
shibori-1.0.0.beta1 source/js/vendor/vertical-tabs.js