kchilek
Posts: 0
Joined: Tue Feb 21, 2017 3:09 am

Select Active navbar button / navbar located in a template

How do I set which button in a navbar is active depending on which page I am on, assuming the navbar is inside a template that is used for each of the the pages. Seems like I should be able to effect the active attribute of the navbar button within load of the new page?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Select Active navbar button / navbar located in a template

Hello,

You can set a navbar active with the JS code below:
pre$(".ui-navbar").find("a").removeClass("ui-btn-active");
Apperyio("mobilenavbaritem_16").addClass("ui-btn-active");/pre

mobilenavbaritem_16 - the name of the navbaritem you want to set "active"

Return to “Issues”