javascript - Stop tab bar refresh on back button in jquery mobile 1.3.1 -


i'm running jqm 1.3.1 + jq 2.0

i have listview (no scroll) of 60 elements + fixed footer (tabbar). if click on 1 element of listview, shows content in new hash page i've added "back" button.

the active button of tabbar set when populating listview.

when click on button, previous page shows active button tabbar not active anymore (none of buttons active). makes me think elements on first page have been refreshed.

how can prevent elements being refreshed , keep state on "back" call ?

    <div data-role='navbar' id='kms'>       <ul id='kml'>         <li id='l5'><a href='#' id='d5' class='ui-btn-active'>ici</a></li>         <li id='l20'><a href='#' id='d20'>5 km</a></li>         <li id='l50'><a href='#' id='d50'>20 km</a></li>         <li id='l100'><a href='#' id='d100'>50 km</a></li>       </ul>     </div> 

remove class ui-btn-active tab bars. , write own customized css class active , passive tabs. worked me.this may help.

.footer-passive { background: #99ce3e ; /*light green*/ } 

for active buttons

 .footer-active {  background: #709630;/*dark green*/ } 

well try using below code snippet.

<div data-role="footer"  data-theme="b" data-position="fixed">     <div data-role="navbar">         <ul>             <li class="footer-color-active"><a href="sample1.html"  class="ui-btn-active"><img src="your_file/path1" /></a></li>             <li class="footer-color"><a href="sample2.html" ><img src="your_file/path2"  /></a></li>             <li class="footer-color"><a href="sample3.html" ><img src="youtr_file/path3" /></a></li>         </ul>     </div> </div> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -