side menu
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
6 changed files
with
67 additions
and
0 deletions
| ... | @@ -7724,6 +7724,32 @@ | ... | @@ -7724,6 +7724,32 @@ |
| 7724 | }); | 7724 | }); |
| 7725 | }); | 7725 | }); |
| 7726 | 7726 | ||
| 7727 | // Search Filter | ||
| 7728 | var sideMenu = function ($) { | ||
| 7729 | function init() { | ||
| 7730 | $(".side-menu li:has(.children) > a").addClass("has-children closed"); | ||
| 7731 | $(".side-menu li .children .current_page_ancestor a").removeClass("closed").addClass("opened"); | ||
| 7732 | $(document).on("click", ".side-menu li:has(.children) > a.has-children.closed", function (e) { | ||
| 7733 | e.preventDefault(); | ||
| 7734 | $(this).removeClass("closed"); | ||
| 7735 | $(this).addClass("opened"); | ||
| 7736 | $(this).next(".children").slideDown(); | ||
| 7737 | return false; | ||
| 7738 | }); | ||
| 7739 | $(document).on("click", ".side-menu li:has(.children) > a.has-children.opened", function (e) { | ||
| 7740 | e.preventDefault(); | ||
| 7741 | $(this).removeClass("opened"); | ||
| 7742 | $(this).addClass("closed"); | ||
| 7743 | $(this).next(".children").slideUp(); | ||
| 7744 | return false; | ||
| 7745 | }); | ||
| 7746 | } | ||
| 7747 | return { | ||
| 7748 | init: init | ||
| 7749 | }; | ||
| 7750 | }(jquery); | ||
| 7751 | jquery(document).ready(sideMenu.init); | ||
| 7752 | |||
| 7727 | // Add your custom JS here. | 7753 | // Add your custom JS here. |
| 7728 | new LazyLoad(); | 7754 | new LazyLoad(); |
| 7729 | window.tz_checkVisible = function (elm, evalType, offset, heightBuffer) { | 7755 | window.tz_checkVisible = function (elm, evalType, offset, heightBuffer) { | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| 1 | |||
| 2 | // Search Filter | ||
| 3 | |||
| 4 | import jquery from 'jquery'; | ||
| 5 | |||
| 6 | var sideMenu = (function($) { | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | |||
| 10 | $(".side-menu li:has(.children) > a").addClass("has-children closed"); | ||
| 11 | |||
| 12 | $(".side-menu li .children .current_page_ancestor a").removeClass("closed").addClass("opened"); | ||
| 13 | |||
| 14 | $(document).on("click", ".side-menu li:has(.children) > a.has-children.closed", function(e){ | ||
| 15 | e.preventDefault(); | ||
| 16 | $(this).removeClass("closed"); | ||
| 17 | $(this).addClass("opened"); | ||
| 18 | $(this).next(".children").slideDown(); | ||
| 19 | return false; | ||
| 20 | }); | ||
| 21 | $(document).on("click", ".side-menu li:has(.children) > a.has-children.opened", function(e){ | ||
| 22 | e.preventDefault(); | ||
| 23 | $(this).removeClass("opened"); | ||
| 24 | $(this).addClass("closed"); | ||
| 25 | $(this).next(".children").slideUp(); | ||
| 26 | return false; | ||
| 27 | }); | ||
| 28 | } | ||
| 29 | |||
| 30 | return { | ||
| 31 | init: init | ||
| 32 | }; | ||
| 33 | |||
| 34 | }(jquery)); | ||
| 35 | |||
| 36 | jquery(document).ready(sideMenu.init); | ||
| 37 | |||
| 38 | export { sideMenu }; | ||
| 39 | |||
| 40 |
| ... | @@ -5,6 +5,7 @@ import LazyLoad from "vanilla-lazyload"; | ... | @@ -5,6 +5,7 @@ import LazyLoad from "vanilla-lazyload"; |
| 5 | import "./_menu_mobile"; | 5 | import "./_menu_mobile"; |
| 6 | import "./_search"; | 6 | import "./_search"; |
| 7 | import "./_header_menu"; | 7 | import "./_header_menu"; |
| 8 | import "./_side_menu"; | ||
| 8 | 9 | ||
| 9 | 10 | ||
| 10 | var myLazyLoad = new LazyLoad(); | 11 | var myLazyLoad = new LazyLoad(); | ... | ... |
-
Please register or sign in to post a comment