Selecting Radio Button using JQuery only shows change after page refresh -


i have page setup using mustache, within page there radio buttons. if use

$('input:radio[name=gender]')[0].checked = true; 

of of methods shown here, nothing works unless reload page. jquery block within jquery(document).ready(function() { tags.

what problem, there way can refresh radio buttons?

yeah not know why not mentioned in more places had similar problem drop down not doing wanted. guessing having same problem based on link methods trying. try this.

   $('input:radio[name=sex]:nth(0)').attr('checked',true).change(); 

the difference being .change();


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -