xoxco/breakpoints — Issue #1: perf improvements
Author: ehynds
Created: 2011-12-02 16:29:35+00:00
State: open

Hi, there are a couple of things you could do to improve performance of this script:

1. Don't store state as a class on the body. Hitting the DOM is expensive. Just store it in a variable, unless of course you want to expose each state to CSS.

2. Cache your jQuery selectors outside of the `setInterval` and `for` loops.

<3