I have a var that returns an HTMLElement like this:
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
<a href="#tabs-1">Tab 1</a>
<span class="ui-icon ui-icon-close tabby">Remove Tab</span>
</li>
From this I want to take the value of the href in the a element.
I know I can take href value using .attr() but how can I “select” the a before?
Assuming var
thatas an HTMLElement as you have mentioned in the question you can try this