Post Pic

jQuery : Find the label for a selected radio button control

Working on a project this morning and had some trouble finding a way to output the label for a checked radio button input control so thought I would share it in case it is of any use to someone else:

$('input[name=myRadioButtonListName]:checked + label').text()

Always interested to hear of any alternative/improved methods of achieving the same goal?

Related Posts

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

One Response

07.14.09

Thanks! This helped me a lot!

Leave Your Response

* Name, Email, Comment are Required
SagePay Approved Partner
Microsoft WebsiteSpark

My Productivity