]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Typos in javascript.md 7307/head
authorAlexander Egorov <a.a.egoroff@gmail.com>
Mon, 30 Nov 2015 10:08:46 +0000 (13:08 +0300)
committerAlexander Egorov <a.a.egoroff@gmail.com>
Mon, 30 Nov 2015 10:08:46 +0000 (13:08 +0300)
- `change` instead of `changed`, `changed` doesn't work at all
- `[data-tabs]` instead of `#tab` better indicates that event handler should be added to `ul.tabs` element

docs/pages/javascript.md

index 7cc6dbb261817bf4f861c86e71073b9f2805c488..e0465a0f92fc079e05bab42f4cb090fe3f5704ff 100644 (file)
@@ -129,7 +129,7 @@ You can use any jQuery selector you like, and if the selector encompasses multip
 Every plugin fires DOM events when certain functions finish. For example, you can listen for when tabs change, or an off-canvas menu opens, and create a callback to respond to it.
 
 ```js
-$('#tab').on('changed.zf.tabs', function() {
+$('[data-tabs]').on('change.zf.tabs', function() {
   console.log('Those tabs sure did change!');
 });
 ```