Browse Source

Fix missing return from $.each in transition

pull/1906/merge
jlukic 9 years ago
parent
commit
1270e031fb
1 changed files with 9 additions and 2 deletions
  1. 11
      src/definitions/modules/transition.js

11
src/definitions/modules/transition.js

@ -516,18 +516,25 @@ $.fn.transition = function() {
}, },
direction: function(animation) { direction: function(animation) {
// quickest manually specified direction // quickest manually specified direction
var
direction
;
animation = animation || settings.animation; animation = animation || settings.animation;
if(typeof animation === 'string') { if(typeof animation === 'string') {
animation = animation.split(' '); animation = animation.split(' ');
$.each(animation, function(index, word){ $.each(animation, function(index, word){
if(word === className.inward) { if(word === className.inward) {
return className.inward;
direction = className.inward;
} }
else if(word === className.outward) { else if(word === className.outward) {
return className.outward;
direction = className.outward;
} }
}); });
} }
// return found direction
if(direction) {
return direction;
}
// slower backup // slower backup
if( !module.can.transition() ) { if( !module.can.transition() ) {
return 'static'; return 'static';

Loading…
Cancel
Save