Permalink
Browse files

add $.support.pjax boolean for checking whether the browser supports …

…pjax
  • Loading branch information...
1 parent 117d928 commit a4db9d07622798baa4c0bd0c8b6057ecd0e94125 @defunkt defunkt committed Jun 5, 2011
Showing with 6 additions and 0 deletions.
  1. +2 −0 README
  2. +4 −0 jquery.pjax.js
View
2 README
@@ -170,6 +170,8 @@ pjax only works with browsers that support the history.pushState API.
For a table of supported browsers see: http://caniuse.com/#search=pushstate
+To check if pjax is supported, use the `$.support.pjax` boolean.
+
## install it
View
@@ -211,6 +211,10 @@ if ( $.inArray('state', $.event.props) < 0 )
$.event.props.push('state')
+// Is pjax supported by this browser?
+$.support.pjax = window.history && window.history.pushState
+
+
// Fall back to normalcy for older browsers.
if ( !window.history || !window.history.pushState ) {
$.pjax = $.noop

0 comments on commit a4db9d0

Please sign in to comment.