mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-13 07:01:20 +08:00
重写active导航
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$ ->
|
||||
$('nav a').each (index) ->
|
||||
if $('nav a')[index].pathname == location.pathname
|
||||
$($('nav a')[index]).parent().addClass('active')
|
||||
$('nav a').each ->
|
||||
$(@).parent().addClass('active') if $(@).attr('href') is location.pathname
|
||||
|
||||
|
||||
Reference in New Issue
Block a user