Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more
Syed Fahim
Joined
Activity
i have also done the proper indentation as well.
hey chris. i followed everything through but i dont understand why submit does not work when i click enter. i have exactly you wrote it. can you please help
$(document).on "turbolinks:load", ->
$("#new-message").on "keypress", (e) ->
if e && e.keycode == 13
e.preventDefault()
$(this).submit()
when i inspect console im getting the following errors
Uncaught ReferenceError: jQuery is not defined
at transition.self-6ad2488465135ab731a045a8ebbe3ea2fc501aed286042496eda1664fdd07ba9.js?body=1:60