I would like the background of the entire site to change from white to black when a certain element comes into view. So when you scroll by the element the background transitions
Your $(window).scroll is correct but i think your code lacks the proper setup to do what you want. Here is a working sample i made from your code to change the color of the background when the block div comes into view when scrolling.