Table TD value gets me the TH value also why?
Hi ,
I was working on the 1.3 jqm table to get TD values, but strangely, I am getting TH along with it? Can you please check on this.
// sample table
- <div id="checkonme" style="display:none;">
- <table data-role="table" id="debug" class="table-stripe ui-responsive table-stroke">
- <thead style="font-size:small;font-weight:bold">
- <tr>
- <th>NickName</th>
- </tr>
- </thead>
- <tbody class="mytbody">
- <tr style="font-size:small;" class="myrow">
- <td class="mynickname">Hey Nick</td>
- </tr>
- </tbody>
- </table>
- </div>
and
//script try
- $('.mytbody tr').click(function( index ) {
- mytest = trim($(this).find('.mynickname').text()) ; console.log(mytest);
- // returns NickName Hey Nick
- mytest = trim($(this).find('.mynickname').htnl()) ; console.log(mytest);
- // returns <b class="ui-table-cell-label">NickName</b>Hey Nick
- })
Anything I fail to catchup ?
Regards
Srikrish
"Learning Continues..."