当前位置: 动力学知识库 > 问答 > 编程问答 >

configuring setPage for mmenu

问题描述:

How do you configure mmenu to indicate the current page in the (m)menu? Is there just something to include on each page?

网友答案:

Mmenu will style the current page based on it's class. If you are using Wordpress for example the current page is given the class "current-menu-item". When you are loading mmenu you need to tell it what class you have given the current page (default is 'selected'):

jQuery("#menu-top").mmenu({
  //options
}, {
  //configuration
  classNames: {
        selected: "current-menu-item"
  }
});
分享给朋友:
您可能感兴趣的文章:
随机阅读: