Skip to content
Browse files

Readme: update with a note about .on('ready') (See #43)

  • Loading branch information...
1 parent 73b9cb5 commit 83b44af5cf58e744f91462fcedbc3c82589bf862 @rstacruz rstacruz committed May 29, 2014
Showing with 13 additions and 0 deletions.
  1. +13 −0 README.md
View
13 README.md
@@ -77,6 +77,19 @@ You should be binding your events outside a `$(function())` block. This will ens
$(document).on('click', 'button', function() { ... })
```
+### Not working with `$(document).on('ready')`
+
+jQuery Turbolinks doesn't support ready events bound via `$(document).on('ready', function)`. Instead, use `$(document).ready(function)` or `$(function)`.
+
+``` javascript
+// BAD: this will not work.
+$(document).on('ready', function () { /* ... */ });
+
+// OK: these two are guaranteed to work.
+$(document).ready(function () { /* ... */ });
+$(function () { /* ... */ });
+```
+
## Changelog
This project uses [Semantic Versioning](http://semver.org/) for release numbering.

0 comments on commit 83b44af

Please sign in to comment.
Something went wrong with that request. Please try again.