Skip to content

Commit

Permalink
Fixed scoping issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JemarJones committed Jul 17, 2015
1 parent 780ab03 commit f1ce8f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/flip.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
$(this).one(whichTransitionEvent(), function(){
$(this).trigger('flip:done');
if (callback !== undefined){
callback.bind(this);
callback.call(this);
}
});
} else if (!$dom.data("initiated")){ //Init flipable DOM
Expand Down Expand Up @@ -186,9 +186,9 @@
//The element has been initiated, all we have to do is change applicable settings
if (options.axis !== undefined || options.reverse !== undefined){
changeSettings.call(this,options,function(){
$(this).trigger('flip:change');
$dom.trigger('flip:change');
if (callback !== undefined){
callback.bind(this);
callback.call(this);
}
});
}
Expand Down Expand Up @@ -237,7 +237,7 @@
transition: savedTrans
});
callback.call(this);
},0);
}.bind(this),0);
}else{
//If we didnt have to set the axis we can just call back.
setTimeout(callback.bind(this), 0);
Expand Down

0 comments on commit f1ce8f6

Please sign in to comment.