user3788491
user3788491

Reputation: 99

jquery mobile active navbar just for icon

i am using latest jquery mobile. i have one question regarding navbar in footer.

How to have just active navbar for icon and text? I attached example. I have three button: home, page two and search in navbar.

When click on button home, or button search, how to get active state just for icon and text Home or search or page two? So just that icon and text be blue, instead of whole button.

<div data-role="navbar">
  <ul>
    <li><a href="#" data-icon="home">Home</a></li>
    <li><a href="#" data-icon="arrow-r">Page Two</a></li>
    <li><a href="#" data-icon="search">Search</a></li>
  </ul>
</div>

Upvotes: 0

Views: 109

Answers (1)

CristiC777
CristiC777

Reputation: 481

I used like this and works !
check again if you have included the file : jquery.mobile-1.4.2.min.css

Is active blue just the clicked < a >

<div data-role="footer">
    <div data-role="navbar" data-iconpos="bottom">
        <ul>
            <li><a href="#" data-icon="home">Home</a></li>
            <li><a href="#" data-icon="arrow-r" class="ui-btn-active">Page Tow</a></li>
            <li><a href="#" data-icon="search">Search</a></li>
        </ul>
    </div><!-- /navbar -->

Upvotes: 1

Related Questions