Jquery get tr value -


this question has answer here:

in below code want values specified in jquery.means want value of tr class=2 how can achive this?

<div class="fav">     <table>     <thead></thead>     <tbody>     <tr class=1">     <td>........     </td>     >/tr>     <tr class=2>     <td>......</td>     </tr>     <tr class="3">     <td>........     </td>     </tr>      </tbody> 

if want html of row, try this, should meaningful name class , should alpha numeric if not aphabetical.

live demo

$('tr.2').html() 

you have many errors in html of not closing class attributes in quotes , using angle bracket of tr. check corrected html.

<div class="fav">     <table>         <thead></thead>         <tbody>             <tr class="1">                 <td>........</td>             </tr>             <tr class="2">                 <td>...tr class 2...</td>             </tr>             <tr class="3">                 <td>........</td>             </tr>         </tbody>     </table> </div> 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -