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-1.0.0.beta6 app/assets/javascripts/contour/errors.js.coffee
contour-1.0.0.beta5 app/assets/javascripts/contour/errors.js.coffee
contour-1.0.0.beta4 app/assets/javascripts/contour/errors.js.coffee
contour-1.0.0.beta3 app/assets/javascripts/contour/errors.js.coffee
contour-1.0.0.beta2 app/assets/javascripts/contour/errors.js.coffee
contour-1.0.0.beta app/assets/javascripts/contour/errors.js.coffee
contour-0.10.2 app/assets/javascripts/contour/errors.js.coffee
contour-0.10.1 app/assets/javascripts/contour/errors.js.coffee
contour-0.10.0 app/assets/javascripts/contour/errors.js.coffee
contour-0.9.4 app/assets/javascripts/contour/errors.js.coffee
contour-0.9.3 app/assets/javascripts/contour/errors.js.coffee
contour-0.9.2 app/assets/javascripts/contour/errors.js.coffee
contour-0.9.1 app/assets/javascripts/contour/errors.js.coffee
contour-0.9.0 app/assets/javascripts/contour/errors.js.coffee
contour-0.8.4 app/assets/javascripts/contour/errors.js.coffee
contour-0.8.3 app/assets/javascripts/contour/errors.js.coffee
contour-0.8.2 app/assets/javascripts/contour/errors.js.coffee
contour-0.8.1 app/assets/javascripts/contour/errors.js.coffee
contour-0.8.0 app/assets/javascripts/contour/errors.js.coffee
contour-0.7.2 app/assets/javascripts/contour/errors.js.coffee