Reputation: 39
I am new to jQuery mobiles. The radio button widget is properly rendering if I hard code that in a HTML file but the widget is not loading for the same HTML contents which I dynamically created from JavaScript via Ajax.
when i try checkboxradio( "refresh" )
, I am getting an error like
"cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'"
Any suggestion on how should I refresh the dynamic contents to get the JQM widgets?
Upvotes: 2
Views: 582
Reputation: 31732
Enhance the markup of Checkbox and Radio buttons dynamically using both .checkboxradio()
and .trigger('create')
.
$('input[type=radio]').checkboxradio().trigger('create');
Upvotes: 2