File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html lang ="zh ">
3-
43< head >
54< script async src ="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js "> </ script >
65 < script >
@@ -4112,6 +4111,31 @@ <h4 class="text-gray"><i class="linecons-tag" style="margin-right: 7px;" id="UED
41124111 <!-- 锚点平滑移动 -->
41134112 < script type ="text/javascript ">
41144113 $ ( document ) . ready ( function ( ) {
4114+ $ ( document ) . on ( 'click' , '.has-sub' , function ( ) {
4115+ var _this = $ ( this )
4116+ if ( ! $ ( this ) . hasClass ( 'expanded' ) ) {
4117+ setTimeout ( function ( ) {
4118+ _this . find ( 'ul' ) . attr ( "style" , "" )
4119+ } , 300 ) ;
4120+
4121+ } else {
4122+ $ ( '.has-sub ul' ) . each ( function ( id , ele ) {
4123+ var _that = $ ( this )
4124+ if ( _this . find ( 'ul' ) [ 0 ] != ele ) {
4125+ setTimeout ( function ( ) {
4126+ _that . attr ( "style" , "" )
4127+ } , 300 ) ;
4128+ }
4129+ } )
4130+ }
4131+ } )
4132+ $ ( '.user-info-menu .hidden-sm' ) . click ( function ( ) {
4133+ if ( $ ( '.sidebar-menu' ) . hasClass ( 'collapsed' ) ) {
4134+ $ ( '.has-sub.expanded > ul' ) . attr ( "style" , "" )
4135+ } else {
4136+ $ ( '.has-sub.expanded > ul' ) . show ( )
4137+ }
4138+ } )
41154139 $ ( "#main-menu li ul li" ) . click ( function ( ) {
41164140 $ ( this ) . siblings ( 'li' ) . removeClass ( 'active' ) ; // 删除其他兄弟元素的样式
41174141 $ ( this ) . addClass ( 'active' ) ; // 添加当前元素的样式
You can’t perform that action at this time.
0 commit comments