I wish to pass a variable to a function and have the function select elements within that variable. I'm unfamiliar with the syntax of this case however, could any one advise?
For example, when a button is clicked within a container I wish for that container to be stored in a variable, okay I have that part. But then I wish to select a certain element within that container like
$(container "div#element");
How can you combine the two, noting that these elements could be deeply nested?