Let's say you have the following div:
<div id="someId">
</div>
You get the div by using:
var element = $('#someId');
How can you turn element into '#someId'? I would also like an answer that work for more complex cases where there are multiple classes and ids.
I want to do this, because I would like to append that string into another selector to target very specific DOM elements.