You need to use Ajax call here. If you don't want to reload the page again then you can use Jquery.post();
Check the JSFiddle and modify the class as per your needs in the function.
$(document).on("click",".onoffswitch-checkbox", function(){
var id = $(this).attr('id');
$.post('/ZfIncidencias/estado/'+id, "", function(data){
//Change the class here
});
});