21 lines
358 B
CoffeeScript
21 lines
358 B
CoffeeScript
|
$ ->
|
||
|
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
|