Sha256: 962b5e707d5a735645bf82c0d0392e27c3eac7ffa6ec6d3bdd37ad9b2f4c9d7e

Contents?: true

Size: 329 Bytes

Versions: 3

Compression:

Stored size: 329 Bytes

Contents

Trestle.ready ->
  $("a[data-toggle='tab']").on 'shown.bs.tab', (e) ->
    hash = $(this).attr("href")

    if hash.substr(0, 1) == "#"
      history.replaceState({ turbolinks: {} }, "", "#!#{hash.substr(1)}")

  if location.hash.substr(0, 2) == "#!"
    $("a[data-toggle='tab'][href='##{location.hash.substr(2)}']").tab("show")

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trestle-0.8.3 app/assets/javascripts/trestle/_tabs.js.coffee
trestle-0.8.2 app/assets/javascripts/trestle/_tabs.js.coffee
trestle-0.8.0 app/assets/javascripts/trestle/_tabs.js.coffee