I am trying to synchronize two checkboxes
one from Landscape view
and another for Portrait view
I am using jquery mobile and HTML 5
, is there any way to do it without using jquery code ?
Strangelly it works if we have inputs with the same id, what I know is not correct. With two labels and one input the design of the first option looks strange.
Please, find the jsfiddle.
I don't think there is automatic synchronization, however it is pretty easy to do with jQuery:
Given the 2 checkboxes, handle the change event on each one and update the other:
Make sure and call .checkboxradio("refresh") after changing checkbox value in order to update the jQM widget.