Nate
Nate

Reputation: 99

How to get the value of span inside a td using Jquery?

How to get the value inside the span class using Jquery?

<td class="date-data"> 
    <input type="text" id="start_2262016233000" class="form-control form-control-small make-small fieldEditable sampleValidation hasDatepicker"     style="display:none" value="26-Jan-2015" maxlength="10" name="$FO$i_submitSample.arrSampleStartDaTe">
    <span class="lblStartDt lblCurrentValue">26-Jan-2015</span>
</td>

Upvotes: 0

Views: 7165

Answers (2)

Djaouad
Djaouad

Reputation: 22776

<td id="my-td">...</td>

$('#my-td span').text();

It's better to supply id's.

Upvotes: 1

user5066707
user5066707

Reputation:

$('.date-data span').text();

It'd be better to add a id.

Upvotes: 1

Related Questions