Search code examples
jquerydom-traversal

Jquery find table cell where value is X


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


Solution

  • You can use filter method:

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