Tuesday, 17 September 2013

saving and re-applaying checkbox list in jQuery

saving and re-applaying checkbox list in jQuery

So I have dropdown list and multiple checkboxes in div
Checkboxes list populates on change of dropdown list
I want to save checked checkboxes so I could reapply them
I managed to serialize checked checkboxes
$("#category").change(function() {
var formData = $(this).parents('form').serialize();
var checked = $('.check input:checkbox:checked').serializeArray();
$.ajax({
url: '/test/hardwares/getByCategory',
type: 'Post',
data: formData,
success: function(data) {
$('.check').html(data);
}
});
});
Thank you for your help

No comments:

Post a Comment