jQuery Mobile team is still working on creating methods for collapsible such as refresh
. Unfortunately, collapsible doesn't accept any method now. Thus, replacing current collapsible with a new one is the only way.
var description_markup = '<div data-role="collapsible" id="Desc" data-theme="e" data-content-theme="b"><h3>Description heading</h3><p>collapsible</p></div>';
$('#Desc').replaceWith(description_markup);
$('#Desc').collapsible();
If collapsible is enhanced and you don't want to replace it, you still can do modifications.
$('#Desc .ui-btn-text').text('new header');
$('#Desc .ui-collapsible-content').append('<p>new content</p>');
Inserting widgets inside collapsible requires .trigger('create')
to enhance widget markup
$('#Desc .ui-collapsible-content').append('<ul data-role="listview"><li><a>link</a></li><li><a>link</a></li></ul>').trigger('create');