Categories: None [Edit]
add_active_to_link
jQuery snippet for Rails projects that parses the url for the current page, and adds an 'active' class decoration to links that match the current page.
By default this snippet is designed to work with Twitter Bootstrap v4 header navigation. However, you can target different elements in your page(s) by modifying the active_element variable. In the default it is targetting links within a line item within a header element with a class of navbar-nav.
Total
Ranking: 118,786 of 188,635
Downloads: 5,788
Daily
Ranking: 140,898 of 188,368
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | dschmura |