yiisoft / jquery-pjax

pushState + ajax = pjax
http://pjax.herokuapp.com
MIT License
144 stars 40 forks source link

Can not work with jQuery3.x #57

Closed a761208 closed 7 years ago

a761208 commented 7 years ago

Uncaught TypeError: Cannot read property 'push' of undefined at jquery.pjax.js:981 at jquery.pjax.js:991

L981:$.event.props.push('state')

Fixed with these:

if ( $.event.props && $.inArray('state', $.event.props) < 0 ) {
  $.event.props.push('state');
} else if ( ! ('state' in $.Event.prototype) ) {
  $.event.addProp('state');
}
cebe commented 7 years ago

could you please make a pull request from your fix?