There is a label (class=lblnewsletter) and checkbox (id=is_subscribed).
When I click on label and if the checkbox is checked the alert will come 111 other wise it return 222.
I have wrote the following code but not working.
Please help.
$$('.lblnewsletter')[0].observe('click', function () {
if($$('#is_subscribed').checked){
alert(111);
}else{
alert(222);
}
});