Question
How to change Default Selected Menu Item in Menu Navigation | CRMHC 7.31 on Pega 7.3.1
I am trying to change the default selected Menu item in Menu Navigation.
I am using Primary Navigation (as given in attachment)
I tried explicitly using a Javascript in a section on load of the Section using Menu Navigation as below but no luck :
<script>
pega.u.d.attachOnload(function(){
var elems = $(".menu-format-primary-navigation> li");
var index=2;
index=parseInt(index);
elems.first().removeClass("menu-item-active");
elems.find("li:eq("+index+")").addClass("menu-item-active");
});
</script>
Is there some way to handle this easily whenever required?
Hello,
Sorry I don't understand what you are trying to achieve. Can you clarify? Which rule are you trying to change here?