On load of the page I want to set it to FALSE immediately. How I can do that please? thanks
Asked
Active
Viewed 8,867 times
1
-
If you unconditionally want to do this all the time. Change the source of the page in the server, it's better. – Jishnu A P Dec 01 '11 at 10:24
6 Answers
2
$(function() {
$('#id_of_your_checkbox').removeAttr('checked');
});

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928
1
You can execute methods when DOM is ready with .ready() and you can change value of a checkbox with .prop() like this;
jQuery(function($) {
$('#id_of_checkbox').prop('checked', false);
})
For this example you have to give an id (id_of_checkbox
) to your checbox.

Emre Erkan
- 8,433
- 3
- 48
- 53
0
$(document).ready(function () {
$("#myCheckbox").prop("checked", false);
});

jabclab
- 14,786
- 5
- 54
- 51
0
Check .prop() and .attr() function and take an idea from these code snippets to implement your functionality.
$(document).ready(function(){
$(".myCheckbox").prop("checked", false); // select by css class
or
$("#myCheckbox").prop("checked", false); // select by checkbox id
});
or
$('.myCheckbox').removeAttr('checked')
If you want to uncheck all checkbox on your page then try this:
$(document).ready(function(){
$("input[type='checkbox']").removeAttr('checked')
})
check these links for more details

Community
- 1
- 1

Niranjan Singh
- 18,017
- 2
- 42
- 75
0
Check the answer in Fiddle it will make check box selected randomly
To make it false, u can do
$(document).ready(function(){
$("input[name='checkbxName']").removeAttr("checked");
})

Akhil Thayyil
- 9,263
- 6
- 34
- 48