I have the following and in this order:
<script type="text/javascript">
$(document).ready(function(){
var overwrite = $('#itemList input:radio:checked').val()
alert('value = '+ overwrite);
});
</script>
<body>
<form ..... >
<div id="itemList">
Overwrite?
<input type="radio" value="Yes" class="overWrite" name="overWrite" >Yes
<input type="radio" value="No" class="overWrite" name="overWrite" >No
</div>
</form>
</body>
when it runs, the alert will have 'value = undefined'
BUT, if I put the javascript after the div (or body), the alert comes back with 'value = Yes'
Why does jquery not recognize the type radio at beginning of page? If I create a type = 'hidden', jquery can read/recognize the value if at beginning of page. When type = 'radio', behaviour is different