Skip to main content

Iterating through Radio buttons in DOM using jQuery

The following code shows how to iterate through each radio button in DOM via jQuery

HTML MarkUp:


Male
Female
jQuery Script:
$(function(){
    $(".c input[type='radio']").each(function(){
        alert($(this).val());
    });        
});​
-- Saravanan

Comments