jonnykates
8/1/2017 - 3:11 PM

Knockback the body when using the navigation

Knockback the body when using the navigation

#bodyForm {
	position: relative;
	&:before {
		content: '';
		position: absolute;
		width: 100%;
		height: 100%;
		background-color: black;
		z-index: 6;
		opacity: 0;
		transition: opacity $transition-duration $transition-curve;
		pointer-events: none;
	}

	&.knockback {
		&:before {
			opacity: .5;
		}
	}
}
$('.menuMainAlt').on('click', function() {
	if($(this).hasClass('active')) {
		$('#bodyForm').addClass('knockback');
	} else {
		$('#bodyForm').removeClass('knockback');
	}
});
$('.menuMain ul li a').hover(
	function() { $('#bodyForm').addClass('knockback'); },
	function() { $('#bodyForm').removeClass('knockback');}
);