View Single Post
Old 11-14-2012, 07:53 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
You are binding to the scroll() event twice in quick succession which may in part account for the twitching.

If '#servicediv' exists on the page then there is no need to check its length.

Code:
$(window).scroll(function () {   
    if ($(window).scrollTop() < 380) {
        $(window).scrollTop(380);
    }
});
but you'll need to test this.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote