website/assets/coffee/modules/awesome-form.coffee
2015-08-30 12:34:43 -04:00

21 lines
358 B
CoffeeScript
Executable File

$ ->
awesomeInput = '.awesome-form .input-group input'
checkInput = (elem) ->
text_val = $(elem).val()
if text_val == ''
$(elem).removeClass 'has-value'
else
$(elem).addClass 'has-value'
return
$(awesomeInput).focusout ->
checkInput(@)
return
$(awesomeInput).on 'change', ->
checkInput(@)
return
return