Created
October 6, 2016 20:05
-
-
Save shrutis22/0bc6fd24f180861c27305dc4759c0999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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