Skip to content

Commit

Permalink
Navigation: Only bind to browser's AnimationEnd event. Fixes jquery-a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepan Riha committed Oct 11, 2013
1 parent 0730c45 commit 6244d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demos/examples/backbone-require/js/libs/jquerymobile.js
Expand Up @@ -4082,11 +4082,11 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
/* exposed $.mobile methods */

//animation complete callback
var animationEndEvent = "WebKitTransitionEvent" in window ? "webkitAnimationEnd" : "animationend";
$.fn.animationComplete = function( callback ) {
if ( $.support.cssTransitions ) {
return $( this ).one( 'webkitAnimationEnd animationend', callback );
}
else{
return $( this ).one( animationEndEvent, callback );
} else {
// defer execution for consistency between webkit/non webkit
setTimeout( callback, 0 );
return $( this );
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.mobile.navigation.js
Expand Up @@ -321,11 +321,11 @@ define( [
/* exposed $.mobile methods */

//animation complete callback
var animationEndEvent = "WebKitTransitionEvent" in window ? "webkitAnimationEnd" : "animationend";
$.fn.animationComplete = function( callback ) {
if ( $.support.cssTransitions ) {
return $( this ).one( 'webkitAnimationEnd animationend', callback );
}
else{
return $( this ).one( animationEndEvent, callback );
} else {
// defer execution for consistency between webkit/non webkit
setTimeout( callback, 0 );
return $( this );
Expand Down

0 comments on commit 6244d94

Please sign in to comment.