Skip to content

Instantly share code, notes, and snippets.

@chimanaco
Last active October 7, 2016 17:30
Show Gist options
  • Save chimanaco/9cbc19c204740f4e3001bbf1d02eee57 to your computer and use it in GitHub Desktop.
Save chimanaco/9cbc19c204740f4e3001bbf1d02eee57 to your computer and use it in GitHub Desktop.
jQuery Copy & Paste
// Velociy
animation($target) {
$target.velocity(
{
opacity: 1
},
{
queue: false,
begin: () => {
console.log('animation begin', $target);
},
complete: () => {
console.log('animation Finish', $target);
},
duration: 1000
}
);
}
// Scroll Top
$('html, body').animate({scrollTop: 200}, 1000);
// Each
var arr = [];
$('#list li').each(function() {
arr.push($(this).html());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment