I am working on a jQuery mobile site, that will be converted into an Android app with PhoneGap.
I have a list of cars, under a collapsible heading. I might have other lists, of vehicles such as boats or planes.
What I want to be able to achieve is an accordion functionality on that individual list item, so for example, someone may click on the Audi, and it drops down with information about that particular car. (At the moment, the link goes to an external page.)
What is the "official" or "best" way of achieving this?
My code is below, but I have also put it in a jsFiddle here. The text underneath the Aircraft carrier link is roughly the functionality I am trying to achieve, but it should only show when clicking on that list item.
<div data-role="collapsible" data-theme="b" data-content-theme="c">
<h2>Choose a car model...</h2>
<ul data-role="listview">
<li><a href="index.html">Acura</a></li>
<li><a href="index.html">Audi</a></li>
</ul>
</div>
<div data-role="collapsible" data-theme="b" data-content-theme="c">
<h2>Choose a boat model...</h2>
<ul data-role="listview">
<li><a href="index.html">Speedboat</a></li>
<li><a href="index.html">Aircraft Carrier</a></li>
<p><br />test info</p>
</ul>
</div>