Created
September 18, 2013 22:07
-
-
Save Ravenna/6616431 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// FADEOUT THE LOADING GRAPHIC AFTER WAITING 1 SEC | |
function fadeSpinner(){ | |
$('.delay-spinner').delay(1000).fadeToggle(500, 'easeOutQuart'); | |
} | |
// FADEIN THE CONTENT | |
function fadeInContent(type){ | |
$('.ps-item-content .'+type+'').fadeToggle(700, 'easeInQuart'); | |
} | |
switch (contentType) | |
{ | |
case 'video': | |
fadeSpinner(); | |
setTimeout(function(){ | |
fadeInContent('video'); | |
},1200); | |
break; | |
case 'infographic': | |
fadeSpinner(); | |
setTimeout(function(){ | |
fadeInContent('infographic'); | |
},1200); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment