Hi
I have a page where I'm using the beautiful controlgroup mobile widgets (where radios and checkboxes are made into those nice touchable buttons).
I'm wondering what the proper way is of changing the states / values of these widgets in javascript after the page has loaded? Setting the checked status for example of the underlying "real" html input does not update the state of the jquery mobile widget.
If we look at the example on the form library page:
http://jquerymobile.com/demos/1.0a1/docs/forms/forms-all.htmlAfter the page loads if you execute the following:
- $('#checkbox-1a').attr('checked', true);
- then the "cheetos" option does not change to be selected.
I read this post:
http://forum.jquery.com/topic/jquery-mobilize-is-now-jquery-fn-pageand thought I could try this:
- $('div[data-role=page]').page('destroy');
- $('div[data-role=page]').page();
That almost works except it produces some strange results with some of the widgets getting repeated and become strangely styled.
Any ideas?