尝试向输入unless
元素的所有输入元素添加一个类type == 'submit'
$('input, textarea') ->
unless $(@).getAttribute('type').val == "submit"
$(@).addClass('form-control')
我的 Javascript 调试工具包不是很发达......所以被迫破译神秘的错误:
[Error] TypeError: '[object Object]' is not a function (evaluating '$('input, textarea')')
ready (disk_files.js, line 37)
dispatch (jquery.js, line 5096)
handle (jquery.js, line 4767)
dispatchEvent
triggerEvent (turbolinks.js, line 199)
onload (turbolinks.js, line 45)