This method does not work because checkbox is not in the DOM:
$('input[type=checkbox][name=rememberme]').prop('checked', true);
I don't know how to use .on() because I do not need to bind event:
$(elements).on( events [, selector] [, data] , handler );
How to checked checkbox which is loaded thru ajax using jQuery?
Use the method is() with property :checked . var parameters = { 'security':$('input[name="security"]').is(':checked'), };
$( document ).ajaxComplete(function() {
$('input[type=checkbox][name=rememberme]').prop('checked', true);
});
Try this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With