Reputation: 631
I have this out put.
<option value="18277">Dollar Max Hospice~Mx</option>
<option value="12979">Routine Adult Physical Exam Visit Limit</option>
<option value="12841">Is Reverse Sterilization Covered Out of Network?</option>
<option value="12918">MD CDH PPO Variables 2</option>
<option value="12917">DC CDH PPO Variables 2</option>
<option value="12833">Is Sterilization Covered No Network?</option>
<option value="12834">Is Sterilization Covered In Network</option>
I have a search box and button when i hit Dollar I need to bold the text in my list box. I need to itterate the list box data and make that text as bold.
Upvotes: 14
Views: 80531
Reputation: 32133
Using the jQuery, you can apply the css:
font-weight:Bold;
So just do:
$myElement.css("font-weight","Bold");
Upvotes: 52
Reputation: 324600
You can't bold an individual <option>
in a <select>
control. It's annoying, but that's how it is.
Upvotes: 1
Reputation: 101473
For me on FF6 at least, it will show as a normal font in the select box, however in the actual list itself it will show bold if you do:
$('select option[value="18277"]').css({ 'font-weight': 'bold' });
Upvotes: 5