Jquery find table cell where value is X

LeBlaireau picture LeBlaireau · Oct 5, 2012 · Viewed 15.6k times · Source

I am trying to find a <td> where the value is 5. It is a calender so there will only be one 5 value.

Answer

undefined picture undefined · Oct 5, 2012

You can use filter method:

$('td').filter(function(){
    return $(this).text() === '5'
})