Sha256: ac2d32bd40bd1adecfd7fd685259466dfe0303a58d272dec558505cc6eb60eca

Contents?: true

Size: 972 Bytes

Versions: 4

Compression:

Stored size: 972 Bytes

Contents

$(".js-vertical-tab-content").hide()
$(".js-vertical-tab-content:first").show()

# if in tab mode 
$(".js-vertical-tab").click (event) ->
  event.preventDefault()
  $(".js-vertical-tab-content").hide()
  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"
  return


# if in accordion mode 
$(".js-vertical-tab-accordion-heading").click (event) ->
  event.preventDefault()
  $(".js-vertical-tab-content").hide()
  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"
  return

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
breezeblocks-0.0.4 source/javascripts/breezeblocks/coffeescript/vertical_tabs.coffee
breezeblocks-0.0.2 source/javascripts/breezeblocks/coffeescript/vertical_tabs.coffee
breezeblocks-0.0.1 source/javascripts/breezeblocks/coffeescript/vertical_tabs.coffee
refills-0.1.0 source/javascripts/refills/coffeescript/vertical_tabs.coffee