Hi
How to retrieve the span text and class using Jquery.
I have multiple span under div but I need first span text and sencond span class can anyone help me on button click
sample
<button id="Export" type="button">Export</button>
<div id="mydiv">
<span>ABC</span>
<span class="tesxt-abc"></span>
<span></span>
</div>
$('#Export').click(function () {
var spans = $("#mydiv").find('span');
for (i = 0; i < spans.length; i++) {
}
});
when I click button output like below
ABC
tesxt-abc