In trying to create a dynamic accordion with jquery, I can't figure out why the individual elements aren't collapsed. They just appear as text rather than taking on the accordion effect. Can anyone spot my mistake? (Assume that the data variables all contain data)
edit: I just tried it in firefox instead of chrome for curiosity's sake and the accordion behavior works..I don't get it
var outdiv = $('<div data-role="collapsible-set"></div>');
for(var i=0; i<data.length; i++){
var innerdiv = $('<div data-role="collapsible" data-collapsed="true" ></div>');
innerdiv.append('<h3>' + 'Tweet #' + i + '</h3>');
innerdiv.append('<p>' + data[i].text + '</p>');
outdiv.append(innerdiv);
outdiv.appendTo('#output');
}