JavaScript
Article
By Sam Deering

jQuery radio button group get value

By Sam Deering

Simple jQuery code snippet to get the chosen value from a radio button group.

$('input:radio[name=theme]:checked').val();

or when it is selected try:

--ADVERTISEMENT--

$('input:radio[name=theme]').click(function() {
var value = $(this).val();
});
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account