0
if(x.length > 0){
    $("#txtHint").append('<div data-role="collapsible-set" id="collapsible-set"></div>');
    for(i = 0; i < x.length; i++){
        var collapsible = '<div data-role="collapsible" data-collapsed="true" data-theme="none">Content</div>';
                    $("[data-role=collapsible-set]").append($(collapsible).collapsible()).trigger("create");
    } 
}

It appends the collapsible divs ok, but they display as if they are in separate sets even though they are not.

This gives a clearer picture of what's happening visually: http://jsfiddle.net/gNJn8/

cameronjonesweb
  • 2,435
  • 3
  • 25
  • 37
  • 1
    use `.collapsibleset()` as follows `$("[data-role=collapsible-set]").append(collapsible).collapsibleset().trigger("create");` – Omar Apr 25 '14 at 16:16
  • possible duplicate of [jQuery mobile cannot refresh the collapsibleset](http://stackoverflow.com/questions/17378836/jquery-mobile-cannot-refresh-the-collapsibleset) – Omar Apr 25 '14 at 16:17

0 Answers0