Why can't I select <td> using its class and data attributes in jQuery?
<table> <tr> <td class="ok" data-test="12-12 00">xxx</td> <td class="ok" data-test="13-12 00">xxx</td> <td class="ok" data-test="14-12 00">xxx</td> <td class="ok" data-test="15-12 00">xxx</td> </tr> </table> I would like to get <td> where data-test = "14-12 00" . Here is my code:
alert($('td .ok[data-test="14-12 00"]').text()); Why is this not working?
+4