I’m using Rails 4.2.3. I’m attempting to define this function in my coffee script
toggle_auto_checkbox -> ()
if $.trim($('#hometown').length > 0 and
($.trim($('#first_name').length > 0 or $.trim($('#last_name').length > 0) and
$('#mySelectBox option').filter(':selected').text().length > 0 and
$('#mySelectBox option').filter(':selected').text().length > 0 and
$('#mySelectBox option').filter(':selected').text().length > 0 and
$('#mySelectBox option').filter(':selected').text().length > 0
$("input.group1").removeAttr("disabled")
else
$("input.group1").attr("disabled", true)
but it is resulting in the error “SyntaxError: [stdin]:27:45: unmatched OUTDENT” when I try and load the page that includes this coffee script. What is the issue with the above?
Aucun commentaire:
Enregistrer un commentaire