looking for some help with the accordion with JSON data
I'm running into an issue with showing all of the associated data in my accordion, meaning that, not everything is appearing in the expanded view for the header of the accordion
what happening is that, the data is showing as:
BMW:
325i
Mercedes
C280
Chevy
Silverado 2500
and I should be seeing the data as
BMW:
325i
525
M3
M5
Mercedes
C280
s550
AMG c43
Chevy
Silverado 2500
Silverado 3500
Silverado 1500
Camero
how can I get all of the models to appear under the manufacture and not just the first model returned?
here is my code:
- $.each(data.d.results, function(index, j) {
- header = "<div id='Cars'>"
- if(title != preTitle)
- {
-
- html += "<h3><a href='#'>" + Title + "</a></h3><div>"
- html += CarModels</div"
- preTitle = title;
- }
- });
- $("#CarSales").append(header + output + "</div>" );