Javascript Scrolling Footer Doesn't Work

Oh cool, that makes a lot of sense!
I had a question though - I embedded that code into my function at load, and the onload trigger worked - I had a question though. Because the

$(document).ready(function() {   
    $(window).trigger("scroll");        
});

script runs whenever the document is loaded, i didn’t read the line as carefully. Thank you!