This is because color changes in navigations are depending on the click of navigation items. So when inside home page, you click a button and go to another page you are not clicking any item in the navigation bar so the active class on the home item of nav bar does not change.
I had experienced a similar scenario, and to make color changes of navigation items I had to implement a custom solution like this which removes active class from home and add active class to the visited page
$('.mx-name-actionButton1').on('click', function(e) {
$('.navbar-inner li:first a')[0].classList.remove('activeLink');
$( ".navbar-inner li a:contains('SecondPage')" )[0].classList.add('activeLink');
});
Hey Umar,
Thank you for your help!
I think I unterstand what you are doing, but I do no fully unterstand every step.
Can you explain me a little more in detail what you are doing there?
Or maybe with a little example:
Lets say I have got two pages: 1.”Home” 2.”Page2 “
I now what to use a action button to go from Home to Page2?
How does the class has to look like?
I made a widget for this a while back. It may or may not still work in Mendix 8. If it doesn’t, it’s almost certainly a quick fix:
https://github.com/tieniber/ActiveMenuSelector
Can anyone help me with the problem I explained above? How can I implement a dynamic class which changes the navigation bar?
best regards :)