Permalink
Browse files

Added ability to ask for current breakpoint

  • Loading branch information...
1 parent 33cd26d commit 9be36adc5900021fd726b8e779ce4af96f82f32c @ten1seven committed Aug 21, 2012
Showing with 13 additions and 5 deletions.
  1. +7 −0 README.md
  2. +4 −3 js/jRespond.js
  3. +2 −2 js/jRespond.min.js
View
@@ -84,6 +84,13 @@ jRes.addFunc({
});
```
+Ask jRespond what the current breakpoint is at any time:
+
+``` JavaScript
+// get the current breakpoint
+jRes.getBreakpoint();
+```
+
The breakpoint parameter is required but the enter and exit parameters are optional (of course, at least one is required for something to happen).
##Performance
View
@@ -1,6 +1,6 @@
/*
* jRespond.js (a simple way to globally manage javascript on responsive websites)
- * version 0.8.0
+ * version 0.8.1
* (c) 2012 Jeremy Fields [jeremy.fields@viget.com]
* released under the MIT license
*/
@@ -177,9 +177,10 @@
};
checkResize();
- // make addFunction public
+ // return
return {
- addFunc: function(elm) { addFunction(elm); }
+ addFunc: function(elm) { addFunction(elm); },
+ getBreakpoint: function() { return curr; }
};
};
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 9be36ad

Please sign in to comment.