.all {text-decoration:bold;}
| Mobiles |
| Samsung Mobiles |
| All Mobiles |
6 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsForums
Top experts
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pranay RanaRank #735 · 3.2K reputationPosted Jan 28, 2014, 10:50 PM EST
$("td:contains('All')").each(
function()
{ $(this).addClass("all"); }
);
Demo for the same : http://jsfiddle.net/vpW5g/
Emad khan55 reputationPosted Jan 28, 2014, 11:35 PM EST
Pranay RanaRank #735 · 3.2K reputationPosted Jan 29, 2014, 12:22 AM EST
$("td:contains('All')").each(
function()
{
if($(this).text().indexOf('All') === 0)
$(this).addClass('all'); }
);
http://jsfiddle.net/vpW5g/5/
Emad khan55 reputationPosted Jan 29, 2014, 12:24 AM EST
Pranay RanaRank #735 · 3.2K reputationPosted Jan 29, 2014, 12:38 AM EST
Kamal RawatRank #567 · 4.3K reputationPosted Jan 29, 2014, 1:08 AM EST
HTML
SCRIPT
$('#tbl tr td').each(function(){
if($(this).html().toLowerCase().indexOf("required") == 0){
$(this).addClass('red')
}
});
The script will go through each td and if it founds any td starts with required or Required
will apply red class.
Mark it accepted if you find it helpful for your question.