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.
addClass("boldText"); *Note about the use of ! important : This is usually not recommended CSS as it's often used in the wrong way. However in this case if you add a class called boldText to an element, chances are, you will always want it to have bold text.
To create a bold text using JavaScript, use the bold() text. This method causes a string to be displayed as bold as if it were in a <b> tag.
Using the jQuery, you can apply the css:
font-weight:Bold;
So just do:
$myElement.css("font-weight","Bold");
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' });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With