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