checked
UK[tʃekt] US[tʃɛkt]
adj. Checkered; obstructed; closed
v. Check, check (past tense and past participle of check)
jquery checked selector syntax
Function::checked selector selects all selected check boxes or radio buttons.
Syntax: $(":checked")
jquery checked selector example
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $(":checked").hide(); }); }); </script> </head> <body> <form action=""> <input type="radio" name="sex" value="male" checked="checked"/> Male <br /> <input type="radio" name="sex" value="female" /> Female <br /> I have a bike: <input type="checkbox" name="vehicle" value="Bike" /> <br /> I have a car: <input type="checkbox" name="vehicle" value="Car" checked="checked" /> <br /> I have an airplane: <input type="checkbox" name="vehicle" value="Airplane" /> </form> <button class="btn1">Hide Checked Options</button> </body> </html>
Click the "Run instance" button to view the online instance