Checkbox Issue with IE8 using jquery
- by rockers
I have this code
$('#Submit').click(function(event) {
var checked = $('.inputchbox'); ......IE8
var ids= checked.map(function() {
return $(this).val();
}).get().join(',');
alert(ids);
});
This Code return all the values which is there for Checkboxbox (.inputchbox is class for the checkbox)
but If I give somethign like this
var checked = $('.inputchbox input:checkbox:checked');
or
var checked = $('.inputchbox input[type=checkbox]:checked');
or
var checked = $('.inputchbox input[name=chk]:checked');
or
var checked = $('.inputchbox').find('input[type=checkbox]:checked');
if i am giving like this nothing is working for me I am not getting the result in IE8?
var checked = $('.inputchbox'); .....this is working but I am getting the checkboxes ids its doesnot checking wheather its checked or not..
I need to get only checked chekcbox id's
thanks