mail_yanpeng@163.com
6 years ago
12 changed files with 5585 additions and 518 deletions
@ -1,373 +0,0 @@ |
|||||
/* -------------------------------- |
|
||||
|
|
||||
Primary style |
|
||||
|
|
||||
-------------------------------- */ |
|
||||
html * { |
|
||||
-webkit-font-smoothing: antialiased; |
|
||||
-moz-osx-font-smoothing: grayscale; |
|
||||
} |
|
||||
|
|
||||
*, *:after, *:before { |
|
||||
-webkit-box-sizing: border-box; |
|
||||
-moz-box-sizing: border-box; |
|
||||
box-sizing: border-box; |
|
||||
} |
|
||||
|
|
||||
html, body { |
|
||||
/* you need to set this to assign to the main element a min height of 100% */ |
|
||||
height: 100%; |
|
||||
} |
|
||||
|
|
||||
body { |
|
||||
font-size: 100%; |
|
||||
font-family: "Titillium Web", sans-serif; |
|
||||
color: #4e6361; |
|
||||
background-color: #f5f4e9; |
|
||||
} |
|
||||
|
|
||||
a { |
|
||||
color: #6cac70; |
|
||||
text-decoration: none; |
|
||||
} |
|
||||
|
|
||||
/* -------------------------------- |
|
||||
|
|
||||
Modules - reusable parts of our design |
|
||||
|
|
||||
-------------------------------- */ |
|
||||
.cd-img-replace { |
|
||||
/* replace text with a background-image */ |
|
||||
display: inline-block; |
|
||||
overflow: hidden; |
|
||||
text-indent: 100%; |
|
||||
white-space: nowrap; |
|
||||
} |
|
||||
|
|
||||
.overflow-hidden { |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
/* -------------------------------- |
|
||||
|
|
||||
Main components |
|
||||
|
|
||||
-------------------------------- */ |
|
||||
.cd-main-content { |
|
||||
/* set a min-height and a z-index to be sure that the main element completely covers the lateral menu */ |
|
||||
min-height: 100%; |
|
||||
position: relative; |
|
||||
background-color: #f5f4e9; |
|
||||
z-index: 2; |
|
||||
padding-top: 0px; |
|
||||
/* Force Hardware Acceleration in WebKit */ |
|
||||
-webkit-transform: translateZ(0); |
|
||||
-webkit-backface-visibility: hidden; |
|
||||
-webkit-transition-property: -webkit-transform; |
|
||||
-moz-transition-property: -moz-transform; |
|
||||
transition-property: transform; |
|
||||
-webkit-transition-duration: 0.4s; |
|
||||
-moz-transition-duration: 0.4s; |
|
||||
transition-duration: 0.4s; |
|
||||
} |
|
||||
.cd-main-content.lateral-menu-is-open { |
|
||||
/* translate to show the lateral menu - all content needs to be put in the .cd-main-content to translate*/ |
|
||||
-webkit-transform: translateX(-260px); |
|
||||
-moz-transform: translateX(-260px); |
|
||||
-ms-transform: translateX(-260px); |
|
||||
-o-transform: translateX(-260px); |
|
||||
transform: translateX(-260px); |
|
||||
} |
|
||||
@media only screen and (min-width: 768px) { |
|
||||
.cd-main-content { |
|
||||
padding-top: 0px; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
header { |
|
||||
position: absolute; |
|
||||
top: 0; |
|
||||
right: 0; |
|
||||
height: 39px; |
|
||||
width: 40px; |
|
||||
z-index: 3; |
|
||||
/* Force Hardware Acceleration in WebKit */ |
|
||||
-webkit-transform: translateZ(0); |
|
||||
-webkit-backface-visibility: hidden; |
|
||||
-webkit-transition-property: -webkit-transform; |
|
||||
-moz-transition-property: -moz-transform; |
|
||||
transition-property: transform; |
|
||||
-webkit-transition-duration: 0.4s; |
|
||||
-moz-transition-duration: 0.4s; |
|
||||
transition-duration: 0.4s; |
|
||||
} |
|
||||
header.lateral-menu-is-open { |
|
||||
/* translate to show the lateral menu */ |
|
||||
-webkit-transform: translateX(-260px); |
|
||||
-moz-transform: translateX(-260px); |
|
||||
-ms-transform: translateX(-260px); |
|
||||
-o-transform: translateX(-260px); |
|
||||
transform: translateX(-260px); |
|
||||
} |
|
||||
header.is-fixed { |
|
||||
position: fixed; |
|
||||
} |
|
||||
@media only screen and (min-width: 768px) { |
|
||||
header { |
|
||||
height: 39px; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#cd-logo { |
|
||||
display: block; |
|
||||
float: left; |
|
||||
margin: 12px 0 0 20px; |
|
||||
} |
|
||||
#cd-logo img { |
|
||||
display: block; |
|
||||
} |
|
||||
@media only screen and (min-width: 768px) { |
|
||||
#cd-logo { |
|
||||
margin: 22px 0 0 30px; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#cd-menu-trigger { |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
top: 0; |
|
||||
height: 100%; |
|
||||
width: 40px; |
|
||||
background-color: #64807d; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-text { |
|
||||
height: 100%; |
|
||||
text-transform: uppercase; |
|
||||
color: #FFF; |
|
||||
font-weight: 600; |
|
||||
display: none; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-icon { |
|
||||
/* this span is the central line in the menu menu */ |
|
||||
display: inline-block; |
|
||||
position: absolute; |
|
||||
left: 50%; |
|
||||
top: 50%; |
|
||||
bottom: auto; |
|
||||
right: auto; |
|
||||
-webkit-transform: translateX(-50%) translateY(-50%); |
|
||||
-moz-transform: translateX(-50%) translateY(-50%); |
|
||||
-ms-transform: translateX(-50%) translateY(-50%); |
|
||||
-o-transform: translateX(-50%) translateY(-50%); |
|
||||
transform: translateX(-50%) translateY(-50%); |
|
||||
width: 18px; |
|
||||
height: 2px; |
|
||||
background-color: #FFF; |
|
||||
/* these are the upper and lower lines in the menu menu */ |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-icon::before, #cd-menu-trigger .cd-menu-icon:after { |
|
||||
content: ''; |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
position: absolute; |
|
||||
background-color: inherit; |
|
||||
left: 0; |
|
||||
/* Force Hardware Acceleration in WebKit */ |
|
||||
-webkit-transform: translateZ(0); |
|
||||
-webkit-backface-visibility: hidden; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-icon::before { |
|
||||
bottom: 5px; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-icon::after { |
|
||||
top: 5px; |
|
||||
} |
|
||||
#cd-menu-trigger.is-clicked .cd-menu-icon { |
|
||||
background-color: rgba(255, 255, 255, 0); |
|
||||
} |
|
||||
#cd-menu-trigger.is-clicked .cd-menu-icon::before, #cd-menu-trigger.is-clicked .cd-menu-icon::after { |
|
||||
background-color: white; |
|
||||
} |
|
||||
#cd-menu-trigger.is-clicked .cd-menu-icon::before { |
|
||||
bottom: 0; |
|
||||
-webkit-transform: rotate(45deg); |
|
||||
-moz-transform: rotate(45deg); |
|
||||
-ms-transform: rotate(45deg); |
|
||||
-o-transform: rotate(45deg); |
|
||||
transform: rotate(45deg); |
|
||||
} |
|
||||
#cd-menu-trigger.is-clicked .cd-menu-icon::after { |
|
||||
top: 0; |
|
||||
-webkit-transform: rotate(-45deg); |
|
||||
-moz-transform: rotate(-45deg); |
|
||||
-ms-transform: rotate(-45deg); |
|
||||
-o-transform: rotate(-45deg); |
|
||||
transform: rotate(-45deg); |
|
||||
} |
|
||||
@media only screen and (min-width: 768px) { |
|
||||
#cd-menu-trigger { |
|
||||
width: 40px; |
|
||||
padding-left: 1.25em; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-text { |
|
||||
display: inline-block; |
|
||||
line-height: 70px; |
|
||||
} |
|
||||
#cd-menu-trigger .cd-menu-icon { |
|
||||
left: 30%; |
|
||||
right: 1.25em; |
|
||||
-webkit-transform: translateX(0); |
|
||||
-moz-transform: translateX(0); |
|
||||
-ms-transform: translateX(0); |
|
||||
-o-transform: translateX(0); |
|
||||
transform: translateX(0); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#cd-lateral-nav { |
|
||||
position: fixed; |
|
||||
height: 100%; |
|
||||
right: 0; |
|
||||
top: 0; |
|
||||
/* the secondary navigation is covered by the main element */ |
|
||||
z-index: 1; |
|
||||
width: 260px; |
|
||||
background-color: #242e30; |
|
||||
overflow-y: auto; |
|
||||
/* Force Hardware Acceleration in WebKit */ |
|
||||
-webkit-transform: translateZ(0); |
|
||||
-webkit-backface-visibility: hidden; |
|
||||
-webkit-transition-property: -webkit-transform; |
|
||||
-moz-transition-property: -moz-transform; |
|
||||
transition-property: transform; |
|
||||
-webkit-transition-duration: 0.4s; |
|
||||
-moz-transition-duration: 0.4s; |
|
||||
transition-duration: 0.4s; |
|
||||
/* this creates the subtle slide in animation of the navigation */ |
|
||||
-webkit-transform: translateX(80px); |
|
||||
-moz-transform: translateX(80px); |
|
||||
-ms-transform: translateX(80px); |
|
||||
-o-transform: translateX(80px); |
|
||||
transform: translateX(80px); |
|
||||
} |
|
||||
#cd-lateral-nav .cd-navigation { |
|
||||
margin: 10px 0 16px; |
|
||||
} |
|
||||
#cd-lateral-nav .sub-menu { |
|
||||
padding: 0 10px 20px 15px; |
|
||||
display: none; |
|
||||
} |
|
||||
#cd-lateral-nav a { |
|
||||
display: block; |
|
||||
line-height: 2em; |
|
||||
padding: 0 16px 0 32px; |
|
||||
color: #aab5b7; |
|
||||
text-decoration:none; |
|
||||
} |
|
||||
#cd-lateral-nav a.current { |
|
||||
background-color: #3a4a4d; |
|
||||
color: #FFF; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav a:hover { |
|
||||
color: #FFF; |
|
||||
} |
|
||||
@media only screen and (min-width: 768px) { |
|
||||
#cd-lateral-nav .cd-navigation { |
|
||||
margin: 20px 0; |
|
||||
} |
|
||||
} |
|
||||
#cd-lateral-nav.lateral-menu-is-open { |
|
||||
-webkit-transform: translateX(0); |
|
||||
-moz-transform: translateX(0); |
|
||||
-ms-transform: translateX(0); |
|
||||
-o-transform: translateX(0); |
|
||||
transform: translateX(0); |
|
||||
/* smooth the scrolling on touch devices - webkit browsers */ |
|
||||
-webkit-overflow-scrolling: touch; |
|
||||
} |
|
||||
|
|
||||
/* style menu items which have a submenu */ |
|
||||
#cd-lateral-nav .item-has-children > a { |
|
||||
position: relative; |
|
||||
text-transform: uppercase; |
|
||||
font-weight: 600; |
|
||||
/* this is the right arrow to show that the item has a submenu */ |
|
||||
} |
|
||||
#cd-lateral-nav .item-has-children > a::after { |
|
||||
content: ''; |
|
||||
display: block; |
|
||||
height: 11px; |
|
||||
width: 8px; |
|
||||
position: absolute; |
|
||||
top: 50%; |
|
||||
bottom: auto; |
|
||||
-webkit-transform: translateY(-50%); |
|
||||
-moz-transform: translateY(-50%); |
|
||||
-ms-transform: translateY(-50%); |
|
||||
-o-transform: translateY(-50%); |
|
||||
transform: translateY(-50%); |
|
||||
right: 1em; |
|
||||
background: url("../img/cd-arrow.svg") no-repeat center center; |
|
||||
background-size: 8px 11px; |
|
||||
-webkit-transition-property: -webkit-transform; |
|
||||
-moz-transition-property: -moz-transform; |
|
||||
transition-property: transform; |
|
||||
-webkit-transition-duration: 0.2s; |
|
||||
-moz-transition-duration: 0.2s; |
|
||||
transition-duration: 0.2s; |
|
||||
} |
|
||||
#cd-lateral-nav .item-has-children > a.submenu-open::after { |
|
||||
-webkit-transform: translateY(-50%) rotate(90deg); |
|
||||
-moz-transform: translateY(-50%) rotate(90deg); |
|
||||
-ms-transform: translateY(-50%) rotate(90deg); |
|
||||
-o-transform: translateY(-50%) rotate(90deg); |
|
||||
transform: translateY(-50%) rotate(90deg); |
|
||||
} |
|
||||
|
|
||||
#cd-lateral-nav .socials { |
|
||||
padding: 0 32px; |
|
||||
} |
|
||||
#cd-lateral-nav .socials:after { |
|
||||
content: ""; |
|
||||
display: table; |
|
||||
clear: both; |
|
||||
} |
|
||||
#cd-lateral-nav .socials a { |
|
||||
height: 32px; |
|
||||
width: 32px; |
|
||||
float: left; |
|
||||
padding: 0; |
|
||||
background-image: url("../img/cd-socials.svg"); |
|
||||
background-repeat: no-repeat; |
|
||||
background-size: 128px 64px; |
|
||||
background-color: #FFF; |
|
||||
margin-right: .5em; |
|
||||
border-radius: 0.25em; |
|
||||
} |
|
||||
#cd-lateral-nav .socials a.cd-twitter { |
|
||||
background-position: 0 0; |
|
||||
} |
|
||||
#cd-lateral-nav .socials a.cd-github { |
|
||||
background-position: -32px 0; |
|
||||
} |
|
||||
#cd-lateral-nav .socials a.cd-facebook { |
|
||||
background-position: -64px 0; |
|
||||
} |
|
||||
#cd-lateral-nav .socials a.cd-google { |
|
||||
background-position: -96px 0; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav .socials a:hover { |
|
||||
background-color: #4e6361; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav .socials a:hover.cd-twitter { |
|
||||
background-position: 0 -32px; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav .socials a:hover.cd-github { |
|
||||
background-position: -32px -32px; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav .socials a:hover.cd-facebook { |
|
||||
background-position: -64px -32px; |
|
||||
} |
|
||||
.no-touch #cd-lateral-nav .socials a:hover.cd-google { |
|
||||
background-position: -96px -32px; |
|
||||
} |
|
@ -0,0 +1,46 @@ |
|||||
|
/* Author: Asif Mughal |
||||
|
* URL: https://www.codehim.com
|
||||
|
* License: MIT License |
||||
|
* Copyright (c) 2018 - Asif Mughal |
||||
|
*/ |
||||
|
/* File: demo-only.js */ |
||||
|
$(function () { |
||||
|
/* Demo only */ |
||||
|
var jSide = $(".menu-container, .menu-head, .menubar"); |
||||
|
$(".menu-position").on('change', function () { |
||||
|
$(jSide).not(".menubar").addClass($(this).val()); |
||||
|
$(".j-pos").html('jSidePosition: "position-right",'); |
||||
|
if ($(this).val() == 'position-left') { |
||||
|
$(jSide).removeClass("position-right"); |
||||
|
$(".j-pos").html('jSidePosition: "position-left",'); |
||||
|
$(".menu-trigger").removeClass("right").addClass("left"); |
||||
|
} else { |
||||
|
$(jSide).removeClass("position-left"); |
||||
|
$(".menu-trigger").removeClass("left").addClass("right"); |
||||
|
} |
||||
|
}); |
||||
|
$(".bg-color").on('change', function () { |
||||
|
var color = $(this).val(); |
||||
|
$(jSide).css({'background': color,}); |
||||
|
$(".bg-color-input").val(color); |
||||
|
}); |
||||
|
$(".bg-color-input").on('input', function () { |
||||
|
$(jSide).css({'background': $(this).val(),}); |
||||
|
}); |
||||
|
$("#set-top").change(function () { |
||||
|
$(".menubar").addClass("sticky"); |
||||
|
$(".j-sticky").html("jSideSticky: true,"); |
||||
|
}); |
||||
|
$("#set-st").change(function () { |
||||
|
$(".menubar").removeClass("sticky"); |
||||
|
$(".j-sticky").html("jSideSticky: false,"); |
||||
|
}); |
||||
|
$(".theme-tray span").click(function () { |
||||
|
var skin = $(this).attr("class"); |
||||
|
$(".menubar").attr('class', skin).addClass("menubar sticky"); |
||||
|
$(".menu-container").attr('class', skin).addClass("menu-container position-left"); |
||||
|
$(".menu-head").attr('class', skin).addClass("menu-head position-left"); |
||||
|
var newcode = 'jSideSkin:' + '\"' + skin + '\",'; |
||||
|
$(".j-skin").html(newcode); |
||||
|
}); |
||||
|
}); |
@ -0,0 +1,107 @@ |
|||||
|
/* Plugin: jSide Menu (Responsive Side Menu) |
||||
|
* Frameworks: jQuery 3.3.1 & Material Design Iconic Font 2.0 |
||||
|
* Author: Asif Mughal |
||||
|
* GitHub: https://github.com/CodeHimBlog
|
||||
|
* URL: https://www.codehim.com
|
||||
|
* License: MIT License |
||||
|
* Copyright (c) 2018 - Asif Mughal |
||||
|
*/ |
||||
|
/* File: jquery.jside.menu.js */ |
||||
|
(function ($) { |
||||
|
$.fn.jSideMenu = function (options) { |
||||
|
var setting = $.extend({ |
||||
|
jSidePosition: "position-left", //possible options position-left or position-right
|
||||
|
jSideSticky: true, // menubar will be fixed on top, false to set static
|
||||
|
jSideSkin: "default-skin", // to apply custom skin, just put its name in this string
|
||||
|
|
||||
|
}, options); |
||||
|
|
||||
|
return this.each(function () { |
||||
|
var target, $headHeight, |
||||
|
$devHeight, |
||||
|
jSide, |
||||
|
arrow, |
||||
|
dimBackground; |
||||
|
target = $(this); |
||||
|
|
||||
|
/* Accessing DOM */ |
||||
|
jSide = $(".menu-container, .menu-head"); |
||||
|
$devHeight = $(window).height(); |
||||
|
$headHeight = $(".menu-head").height(); |
||||
|
arrow = document.createElement("i"); |
||||
|
dimBackground = $(".dim-overlay"); |
||||
|
// Set the height of side menu according to the available height of device
|
||||
|
$(target).css({ |
||||
|
'height': $devHeight - $headHeight, |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
if (setting.jSideSticky == true) { |
||||
|
$(".menubar").addClass("sticky"); |
||||
|
} else { |
||||
|
$(".menubar").removeClass("sticky"); |
||||
|
} |
||||
|
|
||||
|
$(".menubar").addClass(setting.jSideSkin); |
||||
|
$(jSide).addClass(setting.jSideSkin).addClass(setting.jSidePosition); |
||||
|
|
||||
|
if ($(jSide).hasClass("position-left")) { |
||||
|
$(".menu-trigger").addClass("left").removeClass("right"); |
||||
|
} else { |
||||
|
$(".menu-trigger").removeClass("left").addClass("right"); |
||||
|
} |
||||
|
|
||||
|
//Dropdown Arrow
|
||||
|
$(arrow).addClass("zmdi zmdi-chevron-down arrow").appendTo(".dropdown-heading"); |
||||
|
|
||||
|
//Dropdowns
|
||||
|
$(".dropdown-heading").click(function () { |
||||
|
var n = $(".has-sub").find("span:hover + ul li").length; |
||||
|
var h = $(".has-sub").find("span:hover + ul li").outerHeight(); |
||||
|
var dropdown = h * n; |
||||
|
var todrop = $(".has-sub").find("span:hover + ul"); |
||||
|
var nodrop = $(".has-sub ul"); |
||||
|
|
||||
|
$(todrop).animate({"height": dropdown}, 100); |
||||
|
$(this).find("i").toggleClass("arrowdown"); |
||||
|
if ($(todrop).height() == dropdown) { |
||||
|
$(todrop).animate({"height": 0}, 100); |
||||
|
} |
||||
|
|
||||
|
if ($(nodrop).height(dropdown)) { |
||||
|
$(nodrop).not(todrop).height(0); |
||||
|
$(".dropdown-heading").not(this).find("i").removeClass("arrowdown"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$(".menu-trigger").click(function () { |
||||
|
$(jSide).toggleClass("open"); |
||||
|
$(dimBackground).show(500); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
//close menu if user click outside of it
|
||||
|
$(window).click(function (e) { |
||||
|
if ($(e.target).closest('.menu-trigger').length) { |
||||
|
return; |
||||
|
} |
||||
|
if ($(e.target).closest(jSide).length) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
$(jSide).removeClass("open"); |
||||
|
if (!$(jSide).hasClass("open")) { |
||||
|
$(dimBackground).hide(500); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
})(jQuery); |
||||
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
@ -1,46 +0,0 @@ |
|||||
jQuery(document).ready(function($){ |
|
||||
var $lateral_menu_trigger = $('#cd-menu-trigger'), |
|
||||
$content_wrapper = $('.cd-main-content'), |
|
||||
$navigation = $('header'); |
|
||||
|
|
||||
//open-close lateral menu clicking on the menu icon
|
|
||||
$lateral_menu_trigger.on('click', function(event){ |
|
||||
event.preventDefault(); |
|
||||
|
|
||||
$lateral_menu_trigger.toggleClass('is-clicked'); |
|
||||
$navigation.toggleClass('lateral-menu-is-open'); |
|
||||
$content_wrapper.toggleClass('lateral-menu-is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ |
|
||||
// firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden
|
|
||||
$('body').toggleClass('overflow-hidden'); |
|
||||
}); |
|
||||
$('#cd-lateral-nav').toggleClass('lateral-menu-is-open'); |
|
||||
|
|
||||
//check if transitions are not supported - i.e. in IE9
|
|
||||
if($('html').hasClass('no-csstransitions')) { |
|
||||
$('body').toggleClass('overflow-hidden'); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
//close lateral menu clicking outside the menu itself
|
|
||||
$content_wrapper.on('click', function(event){ |
|
||||
if( !$(event.target).is('#cd-menu-trigger, #cd-menu-trigger span') ) { |
|
||||
$lateral_menu_trigger.removeClass('is-clicked'); |
|
||||
$navigation.removeClass('lateral-menu-is-open'); |
|
||||
$content_wrapper.removeClass('lateral-menu-is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ |
|
||||
$('body').removeClass('overflow-hidden'); |
|
||||
}); |
|
||||
$('#cd-lateral-nav').removeClass('lateral-menu-is-open'); |
|
||||
//check if transitions are not supported
|
|
||||
if($('html').hasClass('no-csstransitions')) { |
|
||||
$('body').removeClass('overflow-hidden'); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
//open (or close) submenu items in the lateral menu. Close all the other open submenu items.
|
|
||||
$('.item-has-children').children('a').on('click', function(event){ |
|
||||
event.preventDefault(); |
|
||||
$(this).toggleClass('submenu-open').next('.sub-menu').slideToggle(200).end().parent('.item-has-children').siblings('.item-has-children').children('a').removeClass('submenu-open').next('.sub-menu').slideUp(200); |
|
||||
}); |
|
||||
}); |
|
File diff suppressed because it is too large
Loading…
Reference in new issue