javascript - How to set a radiobutton active in jQuery radiobutton group -


i trying set radiobutton active standart jquery function in demo if onclick event.

http://jqueryui.com/button/#radio

i wanna same onclick not on click, wanna in function called.

tried not working right:

function checkradio() {     $("#labelradiovu").button("enable");     $('#radiovu').prop('checked', true);     //alert($("input[name='']:checked").val())     document.getelementbyid("labelradiovu").style.color = "white";     document.getelementbyid("labelradiovu").style.backgroundcolor = "red";     //document.getelementbyid("radiovu").checked = true; }; 

you can trigger click on radio

 $('#radiovu').trigger('click') 

example: http://jsfiddle.net/nzleu/


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -