javascript - set groupt of radion value jquery -


i have group ooa radion buttons defined so

<input type="radio" name="required[status]" id="status" value="1">yes </label> <input type="radio" name="required[status]" id="status_1" value="0"> no </label> <input type="radio" name="required[status]" id="status_2" value="2">maybe </label> 

this stores value 0,1,2 in field status in db

later, value db 1, how use jquery check appropriate radio button?

if trying check radio button element value can jquery attribute selector.

click me

you can element value this:

$('[value=value_from_db]').prop("checked", true); 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -