In this repo i store all my websites, each in a different branch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 regels
3.3 KiB

  1. // ==============================================
  2. // Right Sidemenu Bar
  3. // ==============================================
  4. $(document).ready(function () {
  5. $menuSidebar = $('.pushmenu-right');
  6. $menusidebarNav = $('#menu-sidebar-list-icon');
  7. $menuSidebarclose = $('#menu-sidebar-close-icon');
  8. //sidebar menu navigation icon toggle
  9. $menusidebarNav.click(function () {
  10. $(this).toggleClass('active');
  11. $('.pushmenu-push').toggleClass('pushmenu-push-toleft pushmenu-active');
  12. $menuSidebar.toggleClass('pushmenu-open');
  13. });
  14. //sidebar menu close icon
  15. $menuSidebarclose.click(function () {
  16. $menusidebarNav.removeClass('active');
  17. $('.pushmenu-push').removeClass('pushmenu-push-toleft');
  18. $menuSidebar.removeClass('pushmenu-open');
  19. });
  20. //Window Click Sidemenu Hide
  21. $('html').click(function (sMenuOutsite) {
  22. // Then find a target: element you clicked on.
  23. var target = $(sMenuOutsite.target);
  24. // Close your sidebar only if you clicked outside of this sidebar:
  25. if ((target.closest($menusidebarNav).length === 0) && (target.closest($menuSidebarclose).length === 0) && (target.closest('.pushmenu').length === 0)) {
  26. $menusidebarNav.removeClass('active');
  27. $('.pushmenu-push').removeClass('pushmenu-push-toleft');
  28. $menuSidebar.removeClass('pushmenu-open')
  29. }
  30. });
  31. if ($(document).find('#pushmenu-right').hasClass('pushmenu')) {
  32. $('body').addClass('pushmenu-push pushmenu-push-left');
  33. $('body').removeClass('pushmenu-push-right');
  34. }
  35. });
  36. // ==============================================
  37. // Left Sidemenu Bar
  38. // ==============================================
  39. $(document).ready(function () {
  40. $menuLeftSidebar = $('.pushmenu-left');
  41. $menuLeftsidebarNav = $('#menu-left-sidebar-list-icon');
  42. $menuLeftSidebarclose = $('#menu-left-sidebar-close-icon');
  43. //sidebar menu navigation icon toggle
  44. $menuLeftsidebarNav.click(function () {
  45. $(this).toggleClass('active');
  46. $('.pushmenu-push').toggleClass('pushmenu-push-toright pushmenu-active');
  47. $menuLeftSidebar.toggleClass('pushmenu-open');
  48. });
  49. //sidebar menu close icon
  50. $menuLeftSidebarclose.click(function () {
  51. $menuLeftsidebarNav.removeClass('active');
  52. $('.pushmenu-push').removeClass('pushmenu-push-toright');
  53. $menuLeftSidebar.removeClass('pushmenu-open');
  54. });
  55. //Window Click Sidemenu Hide
  56. $('html').click(function (sMenuOutsite) {
  57. // Then find a target: element you clicked on.
  58. var target = $(sMenuOutsite.target);
  59. // Close your sidebar only if you clicked outside of this sidebar:
  60. if ((target.closest($menuLeftsidebarNav).length === 0) && (target.closest($menuLeftSidebarclose).length === 0) && (target.closest('.pushmenu').length === 0)) {
  61. $menuLeftsidebarNav.removeClass('active');
  62. $('.pushmenu-push').removeClass('pushmenu-push-toright');
  63. $menuLeftSidebar.removeClass('pushmenu-open')
  64. }
  65. });
  66. if ($(document).find('.pushmenu-left').hasClass('pushmenu')) {
  67. $('body').addClass('pushmenu-push pushmenu-push-right');
  68. $('body').removeClass('pushmenu-push-left');
  69. }
  70. });