Sha256: 9cdae50fd93a425af1599de2c95ea4a4c723198a791df9028af24690ee5e559c

Contents?: true

Size: 1.09 KB

Versions: 14

Compression:

Stored size: 1.09 KB

Contents

//= require 'bootstrap-sprockets'
//= require 'bootstrap-bookingsync-sprockets'

//= require 'chosen'

$ ->
  $(".chosen").chosen()

  responsiveButtons = '<div class="example-responsive-nav">
    <div class="btn-group" role="group" aria-label="screensize">
      <button type="button" class="btn btn-secondary"
              data-value="bs-example-iframe-container-mobile">Mobile</button>
      <button type="button" class="btn btn-secondary"
              data-value="bs-example-iframe-container-tablet">Tablet</button>
      <button type="button" class="btn btn-secondary"
              data-value="bs-example-iframe-container-desktop">Desktop</button>
    </div>
  </div>'

  for example in $(".example-responsive")
    $(example).find(".sheet-header").append(responsiveButtons)

  $(document).on 'click', '.example-responsive-nav button', (event) ->
    button = $(this)
    example = button.parents('.example').find('.bs-example')
    example.removeClass('bs-example-iframe-container-mobile bs-example-iframe-container-tablet
      bs-example-iframe-container-desktop')
    example.addClass(button.data('value'))

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bootstrap-bookingsync-sass-3.0.0 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-2.0.0 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.5 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.4 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.3 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.2 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.1 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta12 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta11 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta10 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta9 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta8 docs/content/assets/javascripts/application.js.coffee
bootstrap-bookingsync-sass-1.0.0.beta7 docs/content/assets/javascripts/application.js.coffee