How to change the text of the td using Jquery.?
I have the td with a dropdown . I want to replace the "Activity class" text by "some other name" . please help me.
Activity class
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Blocked AccountPosted Oct 20, 2014, 5:41 AM
You can do like this.
<table id="demoTable">
<tr>
<td align="left" class="ItemLabel" classname="ItemLabel" style="width: 50%;">Activity class<br>
<select class="inputFieldClass" classname="inputFieldClass" id="QA_0-1-71" name="QA_0-1-71">
<option value=""><None>option>
<option value="15105">First Time Contactoption>
<option value="15106">Follow upoption>
select>td>
tr>
table>
and add script on header
<script type="text/javascript">
$(document).ready(function () {
$("#demoTable td").each(function () {
var t=$(this).html();
$(this).html(t.replace('Activity class', 'some other name'));
});
});
script>