Skip to content

Instantly share code, notes, and snippets.

@jtaby
Created August 20, 2011 20:46
Show Gist options
  • Save jtaby/1159634 to your computer and use it in GitHub Desktop.
Save jtaby/1159634 to your computer and use it in GitHub Desktop.
this.$().animate({
scale: 1,
translateX: 0,
translateY: 0,
top: document.body.scrollTop,
left: 0,
width: window.innerWidth,
height: window.innerHeight
}, animationDuration * 3, easing, function() {
setTimeout(function(){
self._showDetails()
}, 300);
})
@cgbystrom
Copy link

Why not pass options as a variable?

var options = {
  scale: 1,
  translateX: 0,
  translateY: 0,
  top: document.body.scrollTop,
  left: 0,
  width: window.innerWidth,
  height: window.innerHeight
};

this.$().animate(options, animationDuration * 3, easing, function() {
  setTimeout(self._showDetails, 300);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment