Automatically Check A Checkbox Value
I’ve used this to automatically set the value of the WordPress ‘subscribe to comments’ checkbox to true, but it has infinite uses. This example plays nicely with other jQuery functions.
1 2 3 | jQuery(document).ready(function($) { document.getElementById("subscribe_comments").checked=true }); |