So I need to get every div that has a class of "height" ( There could be many on one page) and test it to see if it's greater than 400. If so, wrap the contents of the div with the class. I can see that this works just fine on one page. I have tested by removing the jquery and the scrollbar goes away. So I know the code works. The problem is that on other pages that are part of the "One page system", the scrollbar doesn't show. So I went searching for a solution and found the each() function. Problem is that ever time I add the each() into the code, the jquery crashes. It's probably crashing because I am doing it wrong.
So how can I test for every element with the class of "height" and wrap it if it is greater than 400 without crashing the code?