Sunday, 11 August 2013

clicked radio button value is displayed as undefined

clicked radio button value is displayed as undefined

The result is shown as undefined for the value of radio button being clicked
$(document).ready(function(){
$("input:radio").change(function(){
checkResult(this);
});
});
function checkResult(el)
{
var clicked=$('el:checked');
var clickedvalue=clicked.val();
alert(clickedvalue);
$this=$(el).parent("div.QA");
$this.slideUp();
}

No comments:

Post a Comment