I have many tr
s which have the same class name - sectiontableentry1.
I want this tr
to be hidden only if it contains a keyword, such as "recommended".
Here is an example http://jsfiddle.net/aQfQK/1/
I have many tr
s which have the same class name - sectiontableentry1.
I want this tr
to be hidden only if it contains a keyword, such as "recommended".
Here is an example http://jsfiddle.net/aQfQK/1/
If I am not misstaken, you are looking for something like this :
$('.sectiontableentry1').each(function(){
if($(this).html().indexOf('recommended') != -1){
$(this).hide()
}
})
Since what you want is a little blurry to me, tell me if I am wrong.
There are no CSS selectors which select elements based on content. The only way to solve this problem without modifying the HTML is to use Javascript.
The best solution is to modify the HTML to include a 'recommended' class on table rows than add the CSS:
tr.recommended {display: none;}