Specifying Elements to Operate on, Based on a Style ID that merely _Contains_ Some Text?
But is there a way to get jQuery to mark a style as hidden when the
style name merely _contains_ some text?
My site has a table of items (foods). Each item can belong to one or
more of a number of categories (breakfast, lunch, dinner, dessert,
snacks, etc.) The table row shows the name of the food, but does not
display the name of the category or categories it belongs to, so as
not to overwhelm the user with all that data. (There's a separate page
for that).
I want to have a dropdown menu that filters the table to show only the
foods that are marked as breakfast, or as lunch, etc.
Let's say I give each row a style id such as "lunch-dinner" or "lunch-
dinner-snack", etc. showing what categories it belongs to, and the
user selects "dinner" from the dropdown menu. Is there a way for
jQuery to find all the rows that have styles that do not _contain_ the
word "dinner"? Then I could set their display attribute to none.
Or, is there a better approach?
Thanks very much in advance to all for any info!