I want to be able to map all elements in a given context, including the context element itself.
Here is the code I'm currently using, but it seems to be inefficient. Is there a better way?
Note. I am using jQ 1.3.2, but I will be updating soon, so I am also interested in 1.4 solutions.
var context = $('#id'); var filters = '.class1, .class2';
Note: .add($(f,c)) works in jQ 1.3 as .add(f,c) in jQ 1.4
source share