When creating a jQuery mobile accordion, how can I get the accordion section that opens when a button is clicked?
When the user clicks the search button, I want to load the results into a list in the second panel, collapse the first and expand the second.
<div data-role="collapsible-set"> <div id="filterContainer" data-role="collapsible" data-collapsed="false"> <h3>Filters</h3> <p>controls to pick options</p> <a href="#" data-role="button" id="search">Search</a> </div> <div id="resultsContainer" data-role="collapsible"> <h3>Results</h3> <p>list of results</p> </div> <div>
Homer source share