Dear Pablo,
very good suggestion! I immediately implemented support for the attribute "disabled" for the elements button, checkbox and input.
It will be available in today's nightly build.
It can be used like this:
var check = board.create('checkbox', [0, 4, 'Click me'], {disabled: true});
check.setAttribute({disabled:false});
If one needs access to the HTML node of the checkbox node, it can be accessed directly via:
The access with getElementById is a little bit more complex. The id of the checkbox is "idOfDiv_idOfText_checkbox". For buttons it is "idOfDiv_idOfText_button" and for input it is
"idOfDiv_idOfText_input". In the above example by Bernat and assuming that the div hosting the construction has the id "box" the checkbox can be accessed with
document.getElementById('box_a11_checkbox')
Your second suggestion, adding a changeevent, is a little bit more involved. We have to think about it. A good solution would be to allow all possible HTML events. But the question is if it is more simple to just use the HTML node check.rendNodeCheckbox than piping events through JSXGraph.
Please give us comments about this issue.
Best wishes,
Alfred