output json data to compressible set
I want to display my data in a collapsible-set. My data is properly formatted from a mySQL database.
The issue is creating the collapsible rows within the collapsible-set. Below is my code which renders a nice looking list, but alas, no collapse. (jQueryMobile - latest version)
<script type="text/javascript">
$(document).ready(function(){
var url="Connections/psImgClConnLocal.php"; //connection to database delivers proper json.
$.getJSON(url,function(myData){
// loop through the events here and append row to imageClasses
$.each(myData.psImgClasses, function(i,dat){
$('#imageClasses')
.append('<h3>'+dat.classCat+'</h3>')
.append('<br>'+dat.Definition+'<br><hr>');
});//each
});//getJSON
});//ready
</script>
<body>
<div data-role="page">
<div data-role="content" data-theme="a">
<div data-role="collapsible-set" id="imageClasses">
</div><!-- /collapse-set -->
</div><!-- /content -->
</div><!-- /page -->
</body>