How can I set class=“active” to navigation menu in codeigniter?

后端 未结 4 1414
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-09 18:23

I just start up to be a web developer. Now I create a dynamic website for the first time. I don\'t know how to set class=\"active\" to the navigation menu. Here is

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-09 18:55

    Try this one. I think no need of javascript or jquery.

    If you are using codeigniter then you can use URI Class. Get the menu from url using

    $this->uri->segment();  
    

    and apply to you code like below

  • "> List Patients
提交回复
热议问题