I have a table that contains comma separated lists of numbers like this: <td>72,76,81</td>. I'm trying to select the table cells that don't contain a particular number. This selector worked:
$("td:not(:contains('76'))", $table)
The issue is that there may be rows that contain '576' or '761', etc.
To solve that issue, I decided to put a <span> around each number, so that it's now: <td><span>72</span>,<span>76</span>,<span>81</span></td>. My selector is now:
$("td:not(:contains('<span>76</span>'))", $table)
When I debug this selector in Firebug, it's is returning some span tag that doesn't actually exist in the HTML source, instead of the correct <td>s.
Basically, putting the '<span>' in the :contains() string is breaking the selector. Is there any selector similar to :contains() that will work properly when HTML is passed to it? Or is there some way I can select by the entire string inside the <span>?
BTW, this site is using jquery 1.3.2.
 
     
     
     
     
     
    