I am trying to use jquery to find a exact value in a cell in a table then add a class to that row I currently have this bit of code.
$("tr").find(".closeID:contains(2)").parent('tr').addClass('selected');
Which does work but its doing contains so if any cell with the class closeID has the value in will add the class but I want it to be exact so that if I look for the number 1 it won't add the class to 1,10,11,12,13 and so on.
This is one of my rows in my table the data is pulled in with php.
<tr>
<td>'. $i++ .'</td>
<td>'.dateTime($data['submit_date']).'</td>
<td>'.dateTime($data['event_date']).'</td>
<td>'.$data['project_code'].'</td>
<td>'.$data['project_name'].'</td>
<td>'.$data['event'].'</td>
<td>'.$data['happened'].'</td>
<td>'.$data['about'].'</td>
<td>'.$data['reporter'].'</td>
<td>'.$data['org'].'</td>
<td>'.$data['trackside'].'</td>
<td>'.$data['location'].'</td>
<td>'.$data['number'].'</td>
<td>'.$data['breach_rule'].'</td>
<td>'.$data['life_rule'].'</td>
<td>'.$data['require_feed'].'</td>
<td>'.$data['email'].'</td>
<td>'.get_region_id($data['region']).'</td>
<td>'.$data['closed_out'].'</td>
<td>'.$data['rssb_num'].'</td>
<td style="display:none;" class="closeID">'.$data['id'].'</td>
<td style="display:none;">'.$data['file_upload'].'</td>
</tr>
If you can help that would be great. Thanks for your time.