I have 2 radio buttons
and I used mootool while loading as
window.addEvent('domready', function() {
var chk="1";
if(chk==1){
$('edit-gender-0').set('checked',true);
}
else if(chk==2){
$('edit-gender-1').set('checked',true);
}
but it is not working at all.
Any help will be appreciated… and any other short solution without the if-condition.
The code you’ve provided works just fine – here’s a test-case: http://jsfiddle.net/oskar/tM29a/