(Here's my first question, please be kind!)
I'm on a mission to disable scrolling, animate a div, and then re-enable scrolling. I've managed to achieve the first two tasks with flying colors, but unfortunately, getting it to scroll again has proven to be quite challenging.
Currently, I am utilizing lockScroll() and unlockScroll() functions created by the talented JeanValjean over at How to programmatically disable page scrolling with jQuery
Any assistance would be greatly appreciated. For a demo, please visit http://jsfiddle.net/Chris_James/1xxL5dnp/6/
jQuery(document).ready(function(){
$(window).scroll(function(){
var p = $( ".testi" );
var offset = p.offset();
if ($(this).scrollTop() > offset.top - $(window).height()/2) {
lockScroll();
$('.testi').addClass( 'testishow' );
setTimeout(function(){
$('.testimonial').fadeIn('fast');
unlockScroll();
},700);
}
})
});