I need to set the toggle state via jQuery when an item is updated somewhere else on the page.
The class of the radbutton is "theRequiredButton" and the button has an attribute of "data-stepinstanceid" (there are multiple instances of this button on the page, and I use the data attribute to find this instance.
I use this to find the element:
var thebutton = $(".theRequiredButton[data-stepinstanceid='" + args + "']"); where args is the stepinstanceid of this particular button.
How do I now change the button's appearance, in effect, toggling it to the selected/unselected state?
I tried "$(thebutton).set_checked('true');, but this throws an error
The class of the radbutton is "theRequiredButton" and the button has an attribute of "data-stepinstanceid" (there are multiple instances of this button on the page, and I use the data attribute to find this instance.
I use this to find the element:
var thebutton = $(".theRequiredButton[data-stepinstanceid='" + args + "']"); where args is the stepinstanceid of this particular button.
How do I now change the button's appearance, in effect, toggling it to the selected/unselected state?
I tried "$(thebutton).set_checked('true');, but this throws an error