Codeigniter--add “active” css class to link, how to?

后端 未结 5 2284
走了就别回头了
走了就别回头了 2021-02-09 15:02

What\'s the quickest and easiest way to add the \"active\" class to a link, so it can be styled? I\'m developing an app in CI, and I\'d like a quick easy way to do this automat

5条回答
  •  不要未来只要你来
    2021-02-09 15:48

    To adding active class (class=”active”) to a link , I’ve done it by doing this:
    In view

    
    

    In controller

    $data['home']="active";
    

    Maybe it's not your solution. but it works for me.

提交回复
热议问题