javascript - jQuery Mobile - Open Collapsible-set with URL parameter -
using jquery mobile, can panel in collapsible-set (accordion?) open default? example, have second panel, "title 2", open on page load. have not found information on , based on url parameter.
here's html have currently:
<div data-role="collapsible-set"> <div data-role="collapsible" data-theme="c" data-content-theme="b"> <h3>title 1</h3> <div>text 1 inside here</div> </div> <div data-role="collapsible" data-theme="c" data-content-theme="b"> <h3>title 2</h3> <div>text 2 here</div> </div> <div data-role="collapsible" data-theme="c" data-content-theme="b"> <h3>title 3</h3> <div>text 3 inside div</div> </div> </div>
here fiddle well:
working example: http://jsfiddle.net/gajotres/qm3wb/
attribute: data-collapsed="false"
official documentation : http://api.jquerymobile.com/collapsible/#option-collapsed
<div data-role="collapsible-set"> <div data-role="collapsible" data-theme="c" data-content-theme="b" data-collapsed="false"> <h3>title 1</h3> <div>text 1 inside here</div> </div> <div data-role="collapsible" data-theme="c" data-content-theme="b"> <h3>title 2</h3> <div>text 2 here</div> </div> <div data-role="collapsible" data-theme="c" data-content-theme="b"> <h3>title 3</h3> <div>text 3 inside div</div> </div> </div>
Comments
Post a Comment