2015-02-27

jQuery: Counting the number of matching class elements on the page

While working on a project I hacked some code together to count the number of flagged questions in an exam. My initial code, which is bad and poorly optimized as seen here: While here I have my optimized code: Not only is the optimized code smaller (nearly half as many lines and its also much easier to read.