Zhuangpeiyue (Talk | contribs) |
Zhuangpeiyue (Talk | contribs) |
||
Line 3: | Line 3: | ||
<script> | <script> | ||
$(function(){ | $(function(){ | ||
− | var url=window.location.pathname; | + | var url=window.location.pathname.split('/'); |
− | + | $('#header a[data-name='+(url[2]?url[2]:'Home')+']').addClass('active').siblings().removeClass('active'); | |
$(window).on('scroll',function(){ | $(window).on('scroll',function(){ | ||
var top=$(this).scrollTop(); | var top=$(this).scrollTop(); |
Revision as of 09:52, 28 September 2017