Best way to add “current” class to nav in Rails 3

后端 未结 24 1806
天涯浪人
天涯浪人 2020-11-29 15:05

I have some static pages in a navigation menu. I want to add a class like \"current\" to the item which is currently displaying.

The way I am doing so is to add tons

24条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 15:46

    all these work with simple nav bars, but what about drop down sub-menu ? when a sub-menu is selected the top menu item should be made 'current' in this case tabs_on_rails me be the solution

提交回复
热议问题