jQuery Mobile - Collapsible List as a header bar item -
i'm trying give "options" drop down in header bar. i've added header. problem is, stretching in "expand" state, , return normal in collapse state.
here's fiddle problem : http://jsfiddle.net/vntr5/
i've tried couple of things :
- i noticed "ui-collapsible-heading ui-collapsible-heading-collapsed" class in collapsed state, vs "ui-collapsible-heading" class in expanded state. captured events , tried adding "ui-collapsible-heading-collapse" class. resulted in keeping list permanently "expanded" once had been expanded.
- i tried making custom css class, , adding , removing those. won't take in
margin-left
added through class. takes when inline.
please help.
code snippet:
html:
<div data-role="header"> <h1>main menu</h1> <div data-role="collapsible" id="optionsmenu" data-mini="true" class="rightmenu" data-collapsed-icon="gear" data-expanded-icon="gear"> <h3 style="margin-left:-20%;">options</h3> <ul data-role="listview"> <li data-icon="false"><a href="#">settings</a></li> <li data-icon="false"><a href="#">logout</a></li> </ul> </div> </div>
css:
.rightmenu{ position: absolute; top:-10%; right:2%; }
working example: http://jsfiddle.net/gajotres/fsszk/
.rightmenu { position: absolute; top:-10%; right:2%; width: 100px !important; } .rightmenu .ui-collapsible-content .ui-listview { margin: -10px -15px -10px -35px !important; }
Comments
Post a Comment