jquery表数据
我有下表jquery表数据,jquery,jquery-plugins,datatables,Jquery,Jquery Plugins,Datatables,我有下表 <thead> <tr> <th>Account ID</th> <th>Code</th> <th>Date Created</th> <th>Date Expires</th> <th>Balance</th> <th>Approve</th> <th>Deny</th> &
<thead>
<tr>
<th>Account ID</th>
<th>Code</th>
<th>Date Created</th>
<th>Date Expires</th>
<th>Balance</th>
<th>Approve</th>
<th>Deny</th>
</tr>
</thead>
<tbody>
<tr class="test">
<td class="giftcardaccount_id"><span>35083</span>
</td>
<td class="code"><span>xxxxxxxxx</span>
</td>
<td><span>2012-06-28</span>
</td>
<td><span>2012-06-28</span>
</td>
<td><span>9.0000</span>
</td>
<td><Button id="approval_0" type="submit" class="save-button btn success floatRight" ><span>Approve</span> </button>
</td>
<td><Button id="deny_0" type="submit" class="save-button btn danger floatRight" ><span>Deny</span> </button>
</td>
</tr>
<tr class="test">
<td class="giftcardaccount_id"><span>35084</span>
</td>
<td class="code"><span>xxxxxxxx</span>
</td>
<td><span>2012-06-28</span>
</td>
<td><span>2012-06-28</span>
</td>
<td><span>9.0000</span>
</td>
<td><Button id="approval_1" type="submit" class="save-button btn success floatRight" ><span>Approve</span> </button>
</td>
<td><Button id="deny_1" type="submit" class="save-button btn danger floatRight" ><span>Deny</span> </button>
</td>
</tr>
</tbody>
$('.test')。单击(函数(){
**EDIT**
did this but not sure how to get the button that was clicked. I can get the data by this, but I dont know if the deny was clicked or submit was?
var id = $(this).children('.giftcardaccount_id').text();
});
$('.test').click(function() {
var id = $(this).find('.giftcardaccount_id:first > span').text();
});