Sha256: 24cf393f198c5d199dcb7917df5c25735ae769d65b4218d2031b171bfb4bfdaa

Contents?: true

Size: 447 Bytes

Versions: 32

Compression:

Stored size: 447 Bytes

Contents

# http://digitalbush.com/projects/masked-input-plugin/

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

    mask = options['mask']
    delete options['mask']

    element.addClass('initialized').mask(mask, options)

$ -> initialize()
$(document).on 'page:change', -> initialize()
$(document).on 'cocoon:after-insert', -> initialize()

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
effective_form_inputs-0.7.6 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.5 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.4 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.3 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.2 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.1 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.7.0 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.6.4 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.6.3 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.6.2 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.6.1 app/assets/javascripts/effective_tel/initialize.js.coffee
effective_form_inputs-0.6.0 app/assets/javascripts/effective_tel/initialize.js.coffee