arturadib / agility

Javascript MVC for the "write less, do more" programmer
http://agilityjs.com
MIT License
542 stars 70 forks source link

model->DOM for radio doesn't check the radio at load of the page #100

Open ghost opened 11 years ago

ghost commented 11 years ago

Doesn't work because in my DOM, my radio inputs are not siblings, they are at different places on the page. And since siblings() doesn't include the original element, my radio button is not checked at the load of the page.

$node.siblings('input[name="'+nodeName+'"]').filter('[value="'+modelValue+'"]').prop("checked", true);