-
-
Save kegster/40d1db3f770a2c7825ab80f3d53b5e87 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
// Move the element off screen | |
if($('.home_consult_content').length) { | |
$('.home_consult_content').css('left', '-100%'); | |
} | |
// When parent visible, move on screen | |
function inf_control_effects() { | |
if($('.home_consult_content_wrap').length) { | |
if($('.home_consult_content_wrap').is_on_screen()) { | |
$('.home_consult_content').animate({ | |
'left': '0' | |
}, 900, 'easeOutCubic'); | |
} | |
} | |
} | |
$(window).scroll(inf_control_effects); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment