I am making a mobile application with jQuery Mobile, but I have a problem with the Navbar Widget.
Here is the relevant part of my HTML code:
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
<div data-role="navbar">
<ul id="abc">
<li><a href="#" class="footerNavbar" data-icon="back" data-role="button" onclick="">a</a></li>
<li id="a"><a href="#" class="footerNavbar" data-icon="check" data-role="button" onclick=""></a>b</li>
<li id="b"><a href="#" class="footerNavbar" data-icon="check" data-role="button" onclick=""></a>c</li>
<li id="c"><a href="#" class="footerNavbar" data-icon="forbidden" data-role="button" onclick="">d</a></li>
<li id="d"><a href="#" class="footerNavbar" data-icon="delete" data-role="button" onclick="">e</a></li>
<li id="e"><a href="#" class="footerNavbar" data-icon="check" data-role="button" onclick="">f</a></li>
<li id="f"><a href="#" class="footerNavbar" data-icon="check" data-role="button" onclick="">g</a></li>
</ul>
</div>
</div>
I want to change the navbar depending on the situation, like this:
f(variable=='?'){
$("#a").hide();
$("#b").hide();
$("#c").show();
$("#d").show();
$("#e").show();
$("#f").show();
}else if(variable=='?'){
$("#a").hide();
$("#b").hide();
$("#c").hide();
$("#d").show();
$("#e").show();
$("#f").show();
}
But the Navbar is still not displayed the way I want. Also, the Navbar does not appear to be displayed in a well-designed way.
How can I obtain this?