Using jQuery to check if all radio buttons have been checked

If you find yourself needing to check if all radio button groups have been checked try this dead simple solution made possible by jQuery:

$(document).ready(function() {
if ($(‘:checked’).length != 5) { alert(‘Please answer all the questions..’); return false; }
});

You can follow any responses to this entry through the RSS 2.0 feed.