Response title
This is preview!
I have even some more of these elements, so there are a few more blacks of code where I check the visibility and add a class if they are already visible. I would really like to write this more compact or create a function to do that job with each element but I have no idea how.
I am not sure if this is relevant, but the next part actually adds a class and there I have a few of the same blocks as well, so I am also interested to shorten that code, that is related to window.scroll.
It would be awesome if somebody could give me an example on how to simply this code and make it more efficient respectively faster to process for the browser.
© 2013 jQuery Foundation
Sponsored by and others.