How to change radio button state programmatically in jQuery ? Last Updated : 25 Jul, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will change the selected option of the radio button using jQuery. To select the value of the radio button we can set the "checked" to set to the desired option. For setting the property, we can use the prop() method in jQuery. Syntax: $(selector).prop("checked", true); Note: Selector, is the desired radio option element to be selected. Example: Let us create a radio button group to select a favorite cricket player. We have created a radio option. By default, "Sachin" will be selected. When we click the button, the "Dhoni" option will be selected as given in the program. HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> </head> <body> <fieldset> <legend>Who is Your Favorite Cricketer?</legend> <input type="radio" name="favorite" value="Dhoni" />Dhoni<br /> <input type="radio" name="favorite" value="Shewag" />Shewag<br /> <input type="radio" name="favorite" checked value="Sachin" />Sachin<br /> <br /> <button id="selectID">Select option</button> </fieldset> <script> $("#selectID").on("click", function () { selectRadio(); }); function selectRadio() { let radioOption = jQuery("input:radio[value=Dhoni]"); // This will select the radio button radioOption.prop("checked", true); } </script> </body> </html> Output: change radio state Comment More infoAdvertise with us Next Article How to know which radio button is selected using jQuery? J jagathish saravanan Follow Improve Article Tags : JQuery jQuery-Selectors jQuery-Questions Similar Reads How to check a radio button with jQuery? There are two methods by which one can dynamically change the currently selected radio button by changing the checked property of the input type. Method 1: Using prop method: The input can be accessed and its property can be set by using the prop method. This method manipulates the 'checked' propert 3 min read How to make a Themed Radio Button using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Themed Radio Button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheet 1 min read How to make a Mini size Radio Button using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Mini size Radio Button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesh 1 min read How to know which radio button is selected using jQuery? To check which radio button is selected in a form, we first get the desired input group with the type of input as an option and then the value of this selection can then be accessed by the val() method. This returns the name of the option that is currently selected. The selector 'input[name=option]: 2 min read How to disable or enable form submit button in jQuery? Enabling or disabling the form submit button based on a checkbox selection in jQuery. This ensures user compliance with terms and conditions before form submission. Syntax:$('#enabled').click(function () { if ($('#submit-button').is(':disabled')) { $('#submit-button').removeAttr('disabled'); } else 2 min read How to Change Label when Radio Button Checked in Tailwind CSS ? Tailwind CSS is a popular utility-first CSS framework that enables developers to quickly style their web applications without writing much CSS code. In this article, we will discuss how to change the label text of a radio button when it is checked using Tailwind CSS. We will explore different approa 3 min read Like