Sha256: 584a14a7624567009e80ec5cf0c47f9425b73db750c1c9a86ec240999c52d448

Contents?: true

Size: 434 Bytes

Versions: 9

Compression:

Stored size: 434 Bytes

Contents

$(document).on 'click', '[data-effective-select-or-text]', (event) ->
  $obj = $(event.currentTarget).closest('.effective-select-or-text')

  $visible = $obj.children('.form-group:visible').first()
  $hidden = $obj.children('.form-group:not(:visible)').first()

  $visible.fadeOut('fast', ->
    $visible.find('select').val('').trigger('change.select2')
    $visible.find('input').val('')

    $hidden.slideDown('fast')
  )

  false

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
effective_bootstrap-0.3.12 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.11 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.10 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.9 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.8 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.7 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.6 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.5 app/assets/javascripts/effective_select_or_text/initialize.js.coffee
effective_bootstrap-0.3.4 app/assets/javascripts/effective_select_or_text/initialize.js.coffee