Posted By

penguin999 on 07/24/07


Tagged

jquery checkbox status


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

francisre
heinz1959
AgentPhoenix
yetanother
martingoldszein
maxvee8
seanpowell


Checkbox status using jquery


 / Published in: JavaScript
 

  1. var var_name = $('#checkbox_id').attr('checked')?1:0;

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Uzbekjon on May 13, 2009

Nice tip. Also you can use .is(':checked') jQuery method wich is among other methods is explained in this jQuery checkbox article

You need to login to post a comment.