Skip to content

Instantly share code, notes, and snippets.

@kegster

kegster/script.js Secret

Created May 4, 2016
Embed
What would you like to do?
// 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