Dear expert, I have facing a problem to select span tag using jquery. Please give a solution. code:
<ul>
<li>
<a href="#Document1">Document 1
<span id="tab_close> x </span>
</a>
</li>
</ul>
Dear expert, I have facing a problem to select span tag using jquery. Please give a solution. code:
<ul>
<li>
<a href="#Document1">Document 1
<span id="tab_close> x </span>
</a>
</li>
</ul>
$('#tab_close')
...if, by selecting, you mean getting the jQuery object representing that node.
I would recommend not using jQuery if all you're doing is selecting an element by id. No need to include the framework for something built into Javascript.
document.getElementById("tab_close");