how to dynamically add collapsible set with json return data?

how to dynamically add collapsible set with json return data?

Hi, 

I'm trying to add collapsible set with json return data, but for whatever reason the result is look like this.
Please give me some advise on how to fix it~~

Thanks 
Kevin

    Here is my code
    1.  <div data-role="content" align="center">
    2.   <label for="search-basic">Search Input:</label>
    3. <input type="search" name="search" placeholder="Book Title, Author, or ISBN#" id="searchkeyword" value="" />
    4.     <input type="button" id="search" value="Search" />
    5.     <div data-role="collapsible-set" id="result"></div>
    6.     <div id=""><b>price may change...</b></div> 
    7.   </div> 
    8. <script>
    9. $(document).ready(function(e) 
    10. {
    11. $("#search").click(function(e) 
    12. {
    13. if ($("#searchkeyword").val() != "")
    14. {
    15. $("#result").empty();
    16. $.getJSON("query.php?action=buyback&keyword=" +$("#searchkeyword").val(), function(data) 
    17. {
    18. if (data.length > 0)
    19. {
    20. for (var x = 0; x < data.length; x++) 
    21. {  
    22. var content = '<div data-role="collapsible" data-collapsed="true" class="ui-collapsible-contain"><h3>' + data[x].TITLE + '</h3><p>Author: ' + data[x].AUTHOR + '<br>ISBN:' + data[x].ISBN + '<br>Price: $' + data[x].PRICE + '</p></div>';
    23. $("#result").append(content).trigger('create');
    24. }
    25. $("#searchkeyword").val("");
    26. }
    27.     });
    28. }
    29.     });

    30. });