SyntaxFix
Write A Post
Hire A Developer
Questions
Your selector won't select the input field, and if it did it would return a jQuery object. Try this:
$('#test2').is(':checked');