Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit becda27

Browse files
committed
change something
1 parent 8f45d09 commit becda27

File tree

1 file changed

+51
-27
lines changed

1 file changed

+51
-27
lines changed

‎cn/index.html‎

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<!-- add class "multiple-expanded" to allow multiple submenus to open -->
4949
<!-- class "auto-inherit-active-class" will automatically add "active" class for parent elements who are marked already with class "active" -->
5050
<li>
51-
<a href="#DesignStackTag">
51+
<a href="#项目1" class="smooth">
5252
<i class="linecons-cog"></i>
5353
<span class="title">Chiness</span>
5454
</a>
@@ -60,8 +60,8 @@
6060
</li>
6161
<li>
6262
<a href="#项目2" class="smooth">
63-
<span class="title smooth">Update Highlights</span>
64-
<span class="label label-pink pull-right hidden-collapsed">v1.3</span>
63+
<span class="title">Update Highlights</span>
64+
<span class="label label-pink pull-right hidden-collapsed">Hot</span>
6565
</a>
6666
</li>
6767
</ul>
@@ -77,19 +77,39 @@
7777
<span class="title">Layout Variants &amp; API</span>
7878
</a>
7979
</li>
80+
<li>
81+
<a href="#DesignStackTag">
82+
<span class="title">Layout Variants2 &amp; API</span>
83+
</a>
84+
</li>
85+
<li>
86+
<a href="#DesignStackTag">
87+
<span class="title">Layout Variants3 &amp; API</span>
88+
</a>
89+
</li>
8090
</ul>
8191
</li>
8292
<li>
83-
<a href="#DesignStackTag">
93+
<a href="#项目4">
8494
<i class="linecons-note"></i>
8595
<span class="title">UI Elements</span>
8696
</a>
8797
<ul>
8898
<li>
89-
<a href="#DesignStackTag">
99+
<a href="#项目4" class="smooth">
90100
<span class="title">Other Elements</span>
91101
</a>
92102
</li>
103+
<li>
104+
<a href="#DesignStackTag">
105+
<span class="title">Layout Variants5 &amp; API</span>
106+
</a>
107+
</li>
108+
<li>
109+
<a href="#DesignStackTag">
110+
<span class="title">Layout Variants6 &amp; API</span>
111+
</a>
112+
</li>
93113
</ul>
94114
</li>
95115
</ul>
@@ -781,29 +801,33 @@ <h4 class="text-gray"><i class="linecons-cog" style="margin-right: 7px;" id="项
781801
</div>
782802
<!-- 锚点平滑移动 -->
783803
<script type="text/javascript">
784-
$(document).ready(function() {
785-
$("a.smooth").click(function() {
786-
$("html, body").animate({
787-
scrollTop: $($(this).attr("href")).offset().top + "px"
788-
}, {
789-
duration: 500,
790-
easing: "swing"
791-
});
792-
return false;
793-
});
794-
// 给点击元素添加active类
795-
$("smooth").click(function(e) {
796-
$("smooth").each(function() {
797-
$(this).removeClass("active");
798-
});
799-
$(this).parent("a").addClass("active");
800-
e.preventDefault();
801-
href = $(this).attr("href");
802-
pos = $(href).position().top - 30;
803-
$("html,body").animate({
804-
scrollTop: pos
805-
}, 500);
804+
// $(document).ready(function() {
805+
// $("#main-menu li ul li").click(function() {
806+
// $(this).siblings('li').removeClass('active'); // 删除其他兄弟元素的样式
807+
// $(this).addClass('active'); // 添加当前元素的样式
808+
// });
809+
// $("a.smooth").click(function() {
810+
// $("html, body").animate({
811+
// scrollTop: $($(this).attr("href")).offset().top - 30
812+
// }, {
813+
// duration: 500,
814+
// easing: "swing"
815+
// });
816+
// });
817+
// return false;
818+
// });
819+
820+
var href = "";
821+
var pos = 0;
822+
$("a.smooth").click(function(e) {
823+
$("#main-menu li").each(function() {
824+
$(this).removeClass("active");
806825
});
826+
$(this).parent("li").addClass("active");
827+
e.preventDefault();
828+
href = $(this).attr("href");
829+
pos = $(href).position().top - 30;
830+
$("html,body").animate({ scrollTop: pos }, 500);
807831
});
808832
</script>
809833
<!-- Bottom Scripts -->

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /