Permalink
Browse files

Fix coffeescript sample [ci skip]

Replace bind() with on() as suggested by the JQuery bind() documentation: https://api.jquery.com/bind/
  • Loading branch information...
1 parent 6e61da2 commit d0b251e986ebbf4358ec9d339367387f32d74792 @10io 10io committed Feb 13, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/working_with_javascript_in_rails.md
@@ -180,7 +180,7 @@ bind to the `ajax:success` event. On failure, use `ajax:error`. Check it out:
$(document).ready ->
$("#new_post").on("ajax:success", (e, data, status, xhr) ->
$("#new_post").append xhr.responseText
- ).bind "ajax:error", (e, xhr, status, error) ->
+ ).on "ajax:error", (e, xhr, status, error) ->
$("#new_post").append "<p>ERROR</p>"
```

0 comments on commit d0b251e

Please sign in to comment.