JQuery Concatenation Of Selectors Without Creating A New Instance?
Is is possible to concatenate two jQuery selectors without creating a new selector in the process? An example would be as follows:
a.push.apply(a, b.get()); // it accepts only native DOM elements
But I wouldn't suggest you to use it, since it is not documented and provided for internal use only. Instead use simple: a = a.add(b)
.
Solution 3:
You can use multiple selectors in a jQuery string simply by comma-separating them, like so:
$('.a, .b')
Post a Comment for "JQuery Concatenation Of Selectors Without Creating A New Instance?"