I'm trying to use jQuery to add classes to a table for a Wordpress site. I've had luck using nth-child(number) for selecting a specific td containing specific info. However, some cells/td's are containing several different information, so I want to select and target based on what they contain. Specifically, I want to select a td based on that it starts with or contains a number, but I can't figure out a way to do this. I've tried using different if statements, but can't get it to work.
Here's the code I use for the other cells, which contains the same information throughout the table:
$( "td:nth-child(5)" ).not( "td:empty" ).addClass("wine-currency");
Any help would be appreciated.