Category: jQuery Questions

jQuery Challenge #1 – Toggle Multiple Checkboxes

This is very basic jquery challenge. Watch first few seconds and try to accomplish it on your own, then resume! <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <input type="checkbox" name="all" id="all" value="all"> <label for="all">All</label> <input type="checkbox" name="apple" id="apple" value="apple"> <label for="apple">Apple</label> <input type="checkbox" name="orange" id="orange"

How to Uncheck a Radio Button Using jQuery

To uncheck a radio button in jQuery, we make use of prop() function.  This function is only available in jQuery 1.6 or higher.  For jQuery 1.5 or lower, please make use of attr() function.  Example is given below for jQuery 1.6 or higher. <!DOCTYPE html> <html> <head> <title>jQuery Tutorial </title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> //Function

How to Check a Radio Button Using jQuery

To check a radio button in jQuery, we make use of prop() function.  This function is only available in jQuery 1.6 or higher.  For jQuery 1.5 or lower, please make use of attr() function.  Example is given below for jQuery 1.6 or higher. <!DOCTYPE html> <html> <head> <title>jQuery Tutorial </title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> //Function

How to Uncheck All Checkboxes Using jQuery

To ubcheck all checkboxes in jQuery, we make use of prop() function with attribute value selector.  This function is only available in jQuery 1.6 or higher.  For jQuery 1.5 or lower, please make use of attr() function.  Example is given below for jQuery 1.6 or higher. <!DOCTYPE html> <html> <head> <title>jQuery Tutorial </title> <script src="http://code.jquery.com/jquery-latest.js"></script>