In this example all things work nice, but when scrolling in large window width then resize it to small window the div still take the .fixed class
So it's working just when the scroll is 0px(top), but not when resizing the window to a small size while scroll it more than 0px
I want it to remove the .fixed class when detecting scroll 0 and window is less than 600px even if the document is already loaded
Example: http://jsbin.com/arehow/1/edit