Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
値が5の場所を見つけようとして<td>います。これはカレンダーなので、5の値は1つだけになります。
<td>
フィルターメソッドを使用できます:
$('td').filter(function(){ return $(this).text() === '5' })
:containsセレクターを使用します。
var td = $("td:contains('5')");
編集:15これにより、および してtdも選択さ25正確が必要な場合は、他の回答が言ったようにメソッドを5使用し.filter
15
25
5
.filter