Skip to content

Instantly share code, notes, and snippets.

@shrutis22
Created October 6, 2016 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrutis22/0bc6fd24f180861c27305dc4759c0999 to your computer and use it in GitHub Desktop.
Save shrutis22/0bc6fd24f180861c27305dc4759c0999 to your computer and use it in GitHub Desktop.
var animator = function( timeOut ) {
$( "[name='animation']" ).removeAttr( "class" );
window.setTimeout(
function() {
$( "[name='animation']" ).each(
function() {
var animToBeApplied = $( this ).attr( "animation" );
$( this ).addClass( "animated " + animToBeApplied );
}
);
},
timeOut
);
};
var hideLoader = function() {
window.setTimeout(
function() {
$( ".loading" ).fadeOut();
},
100
);
};
$( document ).ready(
function() {
$( "#projects" ).pagepiling(
{
afterRender: function(){
hideLoader();
animator( 1000 );
},
onLeave: function( index, nextIndex, direction ) {
animator( 500 );
}
}
);
$( "#share" ).jsSocials(
{
showCount: true,
showLabel: true,
shares: [ "twitter", "facebook", "googleplus", "linkedin", "pinterest", "stumbleupon" ]
}
);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment