You need to sign in to do that
Don't have an account?
How to make a selected radio option bold?
I am having a scenario where I have to make the selected option of the radio-button list highlighted i.e. bold.
<apex:selectRadio value="{!ItemData}" id="itemOptions">
<apex:selectOption itemValue="Item 1" itemLabel="Item 1"/>
<apex:selectOption itemValue="Item 2" itemLabel="Item 2"/>
</apex:selectRadio>
If I select "Item 1" then the label for "Item 1" should become bold. I know this is possible using Javascript and CSS, but I am unable to find a way how to do it.
I have to use apex tags, html tags suggestions is not possible to implemented.
I would try it with jQuery:
First define a style class for the bold label:
Now trigger for the selected option:
And here is a visualforce code:
All Answers
I would try it with jQuery:
First define a style class for the bold label:
Now trigger for the selected option:
And here is a visualforce code:
Thanks mast0r, that has worked in the initial time the page is loaded. But when I will reload the page, I need to keep the radio button checked and highlighted. How to do this with jQuery ?
What do you mean with reload? reRender or completely reload?
Complete reload.
Sorry, this is already another question...