Skip to content

Commit

Permalink
Allow startVal/endVal to be set as functions
Browse files Browse the repository at this point in the history
  • Loading branch information
armandocanals committed Nov 20, 2012
1 parent 1974b7f commit 50767eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.scrollorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@
delay: anim.delay,
duration: anim.duration,
property: anim.property,
startVal: anim.start !== undefined ? anim.start : parseInt(target.css(anim.property),10), // if undefined, use current css value
endVal: anim.end !== undefined ? anim.end : parseInt(target.css(anim.property),10), // if undefined, use current css value
startVal: anim.start !== undefined ? typeof(anim.start) == 'function' ? anim.start() : anim.start : parseInt(target.css(anim.property),10), // if undefined, use current css value
endVal: anim.end !== undefined ? typeof(anim.end) == 'function' ? anim.end() : anim.end : parseInt(target.css(anim.property),10), // if undefined, use current css value
baseline: anim.baseline !== undefined ? anim.baseline : 'bottom',
easing: anim.easing
});
Expand Down Expand Up @@ -530,4 +530,4 @@
}
});

})(jQuery);
})(jQuery);

0 comments on commit 50767eb

Please sign in to comment.