Page 1 of 1

Select Active navbar button / navbar located in a template

Posted: Mon Jul 10, 2017 5:04 am
by kchilek

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?


Select Active navbar button / navbar located in a template

Posted: Mon Jul 10, 2017 6:01 pm
by Serhii Kulibaba

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"