Sha256: 58f7499e09e69f5b8da29b355e1b2a0b74bdaea461b4658b23ba024057cbabb0

Contents?: true

Size: 516 Bytes

Versions: 38

Compression:

Stored size: 516 Bytes

Contents

jQuery ->
  $(".field_with_errors input, .field_with_errors_cleared input, .field_with_errors textarea, .field_with_errors_cleared textarea, .field_with_errors select, .field_with_errors_cleared select").change( () ->
    el = $(this)
    if el.val() != '' && el.val() != null
      $(el).parent().removeClass('field_with_errors')
      $(el).parent().addClass('field_with_errors_cleared')
    else
      $(el).parent().removeClass('field_with_errors_cleared')
      $(el).parent().addClass('field_with_errors')
  )

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
contour-0.7.1 app/assets/javascripts/contour/errors.js.coffee
contour-0.7.0 app/assets/javascripts/contour/errors.js.coffee
contour-0.6.1 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.6.0 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.7 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.6 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.5 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.4 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.3 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.2 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.1 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.5.0 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.4.0 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.3.2 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.3.1 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.3.0 vendor/assets/javascripts/contour/errors.js.coffee
contour-0.2.1 vendor/assets/javascripts/errors.js.coffee
contour-0.1.1 vendor/assets/javascripts/errors.js.coffee