Ajax call catch event not working on Bootstrap switch inside datatables plugin on responsive view.
$('.switch').bootstrapSwitch();
$('.switch').on('switchChange.bootstrapSwitch', function ()
{
var id =$(this).attr("attrid");
$.ajax({
type:'POST',
url:'<?php echo base_url();?>parties/party_status_ajax',
data:{'id':id,'checked':$(this).bootstrapSwitch('state')},
success: function (data)
{
$('.close').click();
$('#successmessage').html(data);
}
});
});