Sha256: 3b58054dd14bddf87a603b777093c14d33ce03be0fa7dccae423b9176eb1c0bd

Contents?: true

Size: 597 Bytes

Versions: 17

Compression:

Stored size: 597 Bytes

Contents

initialize = (target) ->
  $(target || document).find('input.effective_email:not(.initialized)').each (i, element) ->
    element = $(element)
    options = element.data('input-js-options') || {}

    # We don't actually do anything with options
    element.addClass('initialized')

$ -> initialize()
$(document).on 'page:change', -> initialize()
$(document).on 'turbolinks:load', -> initialize()
$(document).on 'turbolinks:render', -> initialize()
$(document).on 'cocoon:after-insert', -> initialize()
$(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget)

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
effective_form_inputs-1.5.0 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.4.1 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.4.0 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.3.0 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.9 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.8 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.7 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.6 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.5 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.4 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.3 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.2 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.1 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.2.0 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.1.15 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.1.14 app/assets/javascripts/effective_email/initialize.js.coffee
effective_form_inputs-1.1.13 app/assets/javascripts/effective_email/initialize.js.coffee