Jquery mobile ui-btn-active in navbar dynamic page.?

Jquery mobile ui-btn-active in navbar dynamic page.?

I've been trying to get this to work for 4 days now, with no luck.

I have a very simple jquery mobile app. The app has a header, content and footer. The footer is being generated dynamically (footer.tpl), like same opencart footer template because it is always the same and I don't want to have its HTML in every page.

my footer.tpl code given below

div data-role="footer" data-position="fixed" data-theme="h">
<div data-role="navbar" data-grid="d" class="nav-glyphish-example">
<ul>
<li><a href="index.php" id="home" data-icon="custom">Home</a></li>
            <li><a href="search.php" id="search" data-icon="custom" >Search</a></li>
            <li><a href="latest.php" id="latest" data-icon="custom">Latest</a></li>
            <li><a href="category.php" id="category" data-icon="custom">Category</a></li>
            <li><a href="cart.php" id="cart" data-icon="custom">Cart</a></li>
</ul>
</div>
</div>

my problem was active button navbar not working, links are working well, but when going to following page my active button still normal style, how to be active style.?


any idea.?

thanks....