mirror of
https://github.com/WebStackPage/WebStackPage.github.io.git
synced 2026-02-06 11:53:17 +08:00
修改en导航栏bug
嗯
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
|
||||
<head>
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<script>
|
||||
@@ -4112,6 +4111,31 @@
|
||||
<!-- 锚点平滑移动 -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.has-sub', function(){
|
||||
var _this = $(this)
|
||||
if(!$(this).hasClass('expanded')) {
|
||||
setTimeout(function(){
|
||||
_this.find('ul').attr("style","")
|
||||
}, 300);
|
||||
|
||||
} else {
|
||||
$('.has-sub ul').each(function(id,ele){
|
||||
var _that = $(this)
|
||||
if(_this.find('ul')[0] != ele) {
|
||||
setTimeout(function(){
|
||||
_that.attr("style","")
|
||||
}, 300);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
$('.user-info-menu .hidden-sm').click(function(){
|
||||
if($('.sidebar-menu').hasClass('collapsed')) {
|
||||
$('.has-sub.expanded > ul').attr("style","")
|
||||
} else {
|
||||
$('.has-sub.expanded > ul').show()
|
||||
}
|
||||
})
|
||||
$("#main-menu li ul li").click(function() {
|
||||
$(this).siblings('li').removeClass('active'); // 删除其他兄弟元素的样式
|
||||
$(this).addClass('active'); // 添加当前元素的样式
|
||||
|
||||
Reference in New Issue
Block a user