shichuan/javascript-patterns — Issue #40: Validity of Find over context in jquery
Author: MikalJ
Created: 2012-02-06 07:56:58+00:00
State: open

regarding https://github.com/shichuan/javascript-patterns/blob/master/jquery-patterns/context-and-find.html

According to http://api.jquery.com/find/, jquery implements selector context with the .find function. So either of the methods are equally valid, and none of them are antipatterns.
The link supplied as documentation (http://paulirish.com/2009/perf/) mentions the same fact, and infact states at 12:18 "there no performance gain over doing that, versus the second one [method]"

Using find over context is purely a matter of readability and the preference of the developer.