Open murderaven opened 9 years ago
@murderaven remember call update method iCheck to update input element.
$(this).iCheck('update');
:)
Hi there!
I'm trying to do the same. I want the user to confirm that he wants to check this box, but update it's not working inside of the event. I must manually run it after event finishes.
$(document).ready(function(){
$('#renew').on('ifChecked', function(e){
if(confirm('Are you want to renew?')){
$(this).iCheck('check');
}else{
$(this).iCheck('uncheck');
}
$(this).iCheck('update');
});
});
If I check the box and press Cancel, it still checked visually (but really is unchecked). I need to run the update method from somewhere else but i dont know from where! Please, help me.
Regards, Anton.
I need help in same issue
I solved. use with http://t4t5.github.io/sweetalert/
window.selected_radio = $('input[type="radio"]:checked');
$('input').on('ifClicked', function (e) {
swal({
title: "Are You Sure?",
text: "Bla Bla .....",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Delete",
cancelButtonText: "No",
closeOnConfirm: true
}, function (isConfirm) {
if (isConfirm) {
window.selected_radio = $(this);
var formData = {sit_user: this.value};
$.ajax({
url: "/ajax_url",
type: "GET",
data: formData,
success: function (data, textStatus, jqXHR) {
}, error: function (jqXHR, textStatus, errorThrown) {
}
});
}else{
window['selected_radio'].iCheck('check');
}
});
});
Hi,
I want to control deleting actions in form areas. My old controller works fine and I try to modify it as iCheck callbacks but it does not work properly. Whats wrong?
Form
Control
Regards.