jQuery is it possible to concatenate two selector variables?
- by Kris Hollenbeck
Lets say I have two variables defining separate selectors, for example...
var parent = $('.parent');
var child = $('.child');
And I want to create a something like the following...
$(parent + child).click();
Which should be equivalent to doing this (if it was correct syntax)...
$('.parent .child').click();
This may not be best practice, however I am curious if it is possible. Thanks for your help in advance.