]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes an incorrect illustration of an example callback for the changed.zf.mediaquery...
authorChris Oyler <chris@zurb.com>
Mon, 1 Feb 2016 22:06:48 +0000 (14:06 -0800)
committerChris Oyler <chris@zurb.com>
Mon, 1 Feb 2016 22:06:48 +0000 (14:06 -0800)
docs/pages/media-queries.md

index e66da7d5dace981c4201bb14e658905aa876bdee..6f2f360dde0c87ecd4dbc618f05f8985f7b4dade 100644 (file)
@@ -6,7 +6,7 @@ js: js/foundation.util.mediaQuery.js
 tags:
   - breakpoints
 ---
+
 ## Default Media Queries
 
 Foundation for Sites has three core breakpoints:
@@ -209,7 +209,7 @@ Foundation.MediaQuery.get('medium') // => only screen and (min-width: 640px)
 The media query helper broadcasts an event on the window every time the breakpoint changes. We use this internally with plugins like Interchange to detect a shift in breakpoint. You can also subscribe to the event yourself.
 
 ```js
-$(window).on('changed.zf.mediaquery', function(event, name) {
-  // name is the name of the breakpoint
+$(window).on('changed.zf.mediaquery', function(event, newSize, oldSize) {
+  // newSize is the name of the now-current breakpoint, oldSize is the previous breakpoint
 });
 ```