|
48 | 48 | <!-- add class "multiple-expanded" to allow multiple submenus to open --> |
49 | 49 | <!-- class "auto-inherit-active-class" will automatically add "active" class for parent elements who are marked already with class "active" --> |
50 | 50 | <li> |
51 | | - <a href="#DesignStackTag"> |
| 51 | + <a href="#项目1" class="smooth"> |
52 | 52 | <i class="linecons-cog"></i> |
53 | 53 | <span class="title">Chiness</span> |
54 | 54 | </a> |
|
60 | 60 | </li> |
61 | 61 | <li> |
62 | 62 | <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> |
65 | 65 | </a> |
66 | 66 | </li> |
67 | 67 | </ul> |
|
77 | 77 | <span class="title">Layout Variants & API</span> |
78 | 78 | </a> |
79 | 79 | </li> |
| 80 | + <li> |
| 81 | + <a href="#DesignStackTag"> |
| 82 | + <span class="title">Layout Variants2 & API</span> |
| 83 | + </a> |
| 84 | + </li> |
| 85 | + <li> |
| 86 | + <a href="#DesignStackTag"> |
| 87 | + <span class="title">Layout Variants3 & API</span> |
| 88 | + </a> |
| 89 | + </li> |
80 | 90 | </ul> |
81 | 91 | </li> |
82 | 92 | <li> |
83 | | - <a href="#DesignStackTag"> |
| 93 | + <a href="#项目4"> |
84 | 94 | <i class="linecons-note"></i> |
85 | 95 | <span class="title">UI Elements</span> |
86 | 96 | </a> |
87 | 97 | <ul> |
88 | 98 | <li> |
89 | | - <a href="#DesignStackTag"> |
| 99 | + <a href="#项目4" class="smooth"> |
90 | 100 | <span class="title">Other Elements</span> |
91 | 101 | </a> |
92 | 102 | </li> |
| 103 | + <li> |
| 104 | + <a href="#DesignStackTag"> |
| 105 | + <span class="title">Layout Variants5 & API</span> |
| 106 | + </a> |
| 107 | + </li> |
| 108 | + <li> |
| 109 | + <a href="#DesignStackTag"> |
| 110 | + <span class="title">Layout Variants6 & API</span> |
| 111 | + </a> |
| 112 | + </li> |
93 | 113 | </ul> |
94 | 114 | </li> |
95 | 115 | </ul> |
@@ -781,29 +801,33 @@ <h4 class="text-gray"><i class="linecons-cog" style="margin-right: 7px;" id="项 |
781 | 801 | </div> |
782 | 802 | <!-- 锚点平滑移动 --> |
783 | 803 | <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"); |
806 | 825 | }); |
| 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); |
807 | 831 | }); |
808 | 832 | </script> |
809 | 833 | <!-- Bottom Scripts --> |
|
0 commit comments