How do I select elements when I already have a DOM element?
If you have a variable containing a DOM element, and want to select elements related to that DOM element, simply wrap it in a jQuery object.
1
2
3
|
|
Many people try to concatenate a DOM element or jQuery object with a CSS selector, like so:
1
|
|
Unfortunately, you cannot concatenate strings to objects.