Bootstrap4 card hover animation css effect
Bootstrap4 card hover animation css effect
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meeny.com</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="main.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
<script src="main.js"></script>
</head>
<body>
<!-- Full screen menu -->
<div class="Fside d-flex align-items-center justify-content-center" id='fside'>
<div class="Fnav">
<div class="row">
<div class="col"><a class="navbar-brand text-light" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a></div>
<div class="col text-right"><a href="#" onclick="javascript:Fsidebar('C');" class="text-light"><i class="fas fa-times fa-2x"></i></a></div>
</div>
<ul class="nav flex-column mt-5" id="Fsidemenu">
</ul>
</div>
</div>
<!-- sidebar -->
<div class="Mside bg-dark" id='aside' style='left:-250px'>
<div class="row">
<div class="col"><a class="navbar-brand text-light" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a></div>
<div class="col text-right"><a href="#" onclick="javascript:Msidebar('C');"><i class="fas fa-times fa-2x text-white"></i></a></div>
</div>
<ul class="nav flex-column mt-5" id="sidemenu"></ul>
</div>
<!-- NavBar -->
<div class="navbarwrap fixed-top MeenyNavTrs py-4">
<div class="collapse bg-dark" id="collapseUp">
<div class="p-5 text-center text-light">
<nav class="navbar navbar-expand-sm navbar-dark">
<ul class="navbar-nav m-auto row" id="tmenu"></ul>
<ul class="navbar-nav ml-auto"><a class="nav-link" data-toggle="collapse" href="#collapseUp" role="button" aria-expanded="false" aria-controls="collapseUp"><i class="fas fa-times fa-2x"></i></a></ul>
</nav>
</div>
</div>
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<div class="navbar-toggler-inner"></div>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto" id="MainMnu">
<li class="nav-item">
<a href="#" onclick="javascript:Fsidebar('L');" class="nav-link"><i class="fas fa-arrow-left"></i></a>
</li>
<li class="nav-item">
<a href="#" onclick="javascript:Msidebar('L');" class="nav-link"><i class="fas fa-arrow-circle-left"></i></a>
</li>
<li class="nav-item">
<a href="#" onclick="javascript:Msidebar('R');" class="nav-link"><i class="fas fa-arrow-circle-right"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" href="#collapseUp" role="button" aria-expanded="false" aria-controls="collapseUp"><i class="fas fa-arrow-circle-up"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"><i class="fas fa-arrow-circle-down"></i></a>
</li>
</ul>
</div>
</nav>
<div class="collapse mb-3 bg-dark" id="collapseExample">
<div class="p-5 text-center text-light">
<nav class="navbar navbar-expand-sm navbar-dark">
<ul class="navbar-nav m-auto row" id="tmenu1"></ul>
<ul class="navbar-nav ml-auto"><a class="nav-link" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"><i class="fas fa-times fa-2x"></i></a></ul>
</nav>
</div>
</div>
</div>
</div>
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active" style="background-image: url(images/n1.png);">
<!-- <img src="images/m1.jpg" class="d-block w-100 " style="height: 57vw; min-height:550px; "> -->
<div class="carousel-caption">
<h3 class="display-4 w100 text-light MfadeInDown"><span class="w700 text-success">Meeny</span>.com<br class="d-md-none" /><span class="text-light w400"> - HTML & CSS</span></h3>
<p class="text-light">Bootstrap4 - responsive navbar</p>
<br><br>
</div>
</div>
<div class="carousel-item" style="background-image: url(images/b3.png);">
<!-- <img src="images/m2.jpg" class="d-block w-100 " style="height: 57vw; min-height:550px;"> -->
<div class="carousel-caption">
<h3 class="display-4 w100 text-light MfadeInDown"><span class="w700 text-primary">Meeny</span>.com<br class="d-md-none" /><span class="text-light w400"> - HTML & CSS</span></h3>
<p class="text-light">Bootstrap4 Theming - change font/color</p>
<a href="" class="btn btn-primary rounded-pill">Link</a>
</div>
</div>
<div class="carousel-item" style="background-image: url(images/T3.png);">
<!-- <img src="images/m2.jpg" class="d-block w-100 " style="height: 57vw; min-height:550px;"> -->
<div class="carousel-caption">
<h3 class="display-4 w100 text-light MfadeInDown"><span class="w700 text-primary">Meeny</span>.com<br class="d-md-none" /><span class="text-light w400"> - HTML & CSS</span></h3>
<p class="text-light">Bootstrap4 Theming - change font/color</p>
<a href="" class="btn btn-primary rounded-pill">Link</a>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev"><img src="images/b_prev.png" alt=""></a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next"><img src="images/b_next.png" alt=""></a>
</div>
<div class="section1 row row-cols-md-4 row-cols-sm-2 m-2">
<div class="p-2">
<div class="card mb-3">
<img src="images/1.jpg" class="card-img-top">
<div class="card-header">
<h5 class="card-title m-0"><i class="fas fa-battery-full "></i> Card header</h5>
</div>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
<div class="card-footer">
<h5 class="card-title m-0"><i class="fas fa-battery-full "></i> Card footer</h5>
</div>
</div>
</div>
<div class="p-2 d-flex align-items-stretch">
<div class="card mb-3">
<img src="images/2.jpg" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
<div class="p-2">
<div class="card mb-3">
<img src="images/3.jpg" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
<div class="p-2">
<div class="card mb-3">
<img src="images/5.jpg" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
<div class="section2 text-center bg-warning py-5">
<div class=" mt-3">
<h1 class="display-4">Hello, world!</h1>
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<hr class="my-4">
<p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
</div>
</div>
<div class="section3 row m-2">
<div class="col-sm-6 col-md-3">
<div class="card mb-3">
<img src="images/3.jpg" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="card mb-3 border-0">
<div class="card-header">
<h5 class="card-title m-0"><i class="fas fa-battery-full "></i> Card header</h5>
</div>
<div class="card-body">
<h5 class="card-title"><i class="fas fa-battery-full "></i> Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
<div class="card-footer">
<h5 class="card-title m-0"><i class="fas fa-battery-full "></i> Card footer</h5>
</div>
<img src="images/2.jpg" class="card-img-bottom Mblur">
</div>
</div>
<div class="col-sm-6 col-md-3 d-flex align-items-stretch">
<div class="card mb-3 bg-primary text-light Mscale2X" style="width: 100%;">
<img src="images/1.jpg" class="card-img-top Mgray">
<div class="card-body">
<h5 class="card-title">d-flex align-items-stretch</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
<div class="col-sm-6 col-md-3 d-flex align-items-stretch">
<div class="card mb-3" style="width: 100%;">
<img src="images/5.jpg" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
<div class="section4">
<div class="row row-cols-md-2">
<div class="card mb-3 border-0">
<div class="row row-cols-md-2 m-0">
<div>
<img src="images/3.jpg" class="card-img-top">
</div>
<div>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
<div class="card mb-3 border-0">
<div class="row row-cols-md-2 m-0">
<div>
<img src="images/5.jpg" class="card-img-top">
</div>
<div>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
</div>
</div>
<ul class="nav mt-5" id="Mmenu"></ul>
<svg width="0" height="0">
<defs>
<clipPath id="SVGPath" transform="scale(2)">
<path class="meeny_svg" d="M103.36,51.7l-51.6,51.6L.16,51.7,51.76.11ZM51.76,96.13,96.19,51.7,51.76,7.28,7.34,51.7Z" transform="translate(-0.16 -0.11)"/>
<rect class="meeny_svg" x="48.73" y="16.55" width="5.07" height="69.31" transform="translate(-21.36 51.14) rotate(-45)"/>
<polygon class="meeny_svg" points="27.59 51.75 24.06 51.75 61.76 89.45 65.34 85.86 27.59 48.11 27.59 51.75"/>
<polygon class="meeny_svg" points="39.66 19.12 46.81 19.12 41.44 13.75 37.85 17.33 39.66 19.14 39.66 19.12"/>
<polygon class="meeny_svg" points="48.12 27.6 84.27 63.75 87.86 60.16 55.29 27.6 48.12 27.6"/>
<polygon class="meeny_svg" points="19.14 39.66 17.33 37.85 13.75 41.44 15.58 43.27 19.14 43.27 19.14 39.66"/>
</clipPath>
</defs>
</svg>
<footer>Footer</footer>
</body>
</html>
scss
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap');
$font-family-base: 'Roboto', sans-serif;
$enable-responsive-font-sizes: true;
$color-1 : #0F4C81;
$color-2 : #7209b7;
$color-3 : #f72585;
$color-4 : #4361ee;
$color-5 : #4cc9f0;
$color-6 : #237a94;
$color-1 : #0F4C81;
$color-2 : #f1faee;
$color-3 : #e63946;
$color-4 : #a8dadc;
$color-5 : #457b9d;
$color-6 : #1d3557;
$primary: $color-1;
$secondary: $color-2;
$success: $color-3;
$info: $color-4;
$warning: $color-5;
$danger: $color-6;
// Dropdown menu container and contents.
$dropdown-bg: $color-1;
$dropdown-link-color: $color-4;
$dropdown-link-hover-color: darken($color-4, 20%);
$dropdown-link-hover-bg: darken($color-1, 10%);
$dropdown-divider-bg: lighten($color-1, 10%);
$dropdown-border-color: rgba($color-5, .15) !default;
@import "scss/bootstrap";
html{
font-size: 15.25px;
letter-spacing: -0.02em;
word-spacing: 0.05em;
}
html,body,.carousel,.carousel-inner,.carousel-item{height: 100%;}
.carousel-item{
background-size: cover;
background-position: center;
}
.carousel-caption{
transform: translateY(-50%);
bottom: initial;
top: 50%;
}
.navbar-toggler {
&:focus {
outline: none;
}
border: 1px solid $warning;
cursor: pointer;
width: 1.8em;
height: 1.8em;
padding: 0 0 0.15em 0.35em;
.navbar-toggler-inner,
.navbar-toggler-inner::before,
.navbar-toggler-inner::after
{
width: 1em;
height: 0.16em;
background-color: $warning;
position: absolute;
}
.navbar-toggler-inner::before
{
content: "";
display: block;
top: -0.3em;
}
.navbar-toggler-inner::after
{
content: "";
display: block;
bottom: -0.3em;
}
.navbar-toggler-inner{
transition: 0.2s;
transform: rotate(0deg);
}
}
.navbar-toggler.active {
.navbar-toggler-inner {
transition: 0.2s;
transform: rotate(45deg); // 45+360
}
.navbar-toggler-inner::before {
top: 0;
opacity: 0;
}
.navbar-toggler-inner::after {
bottom: 0;
transform: rotate(-90deg);
}
}
ul#tmenu {
li{
font-size: 1.2rem;
font-weight: bold;
margin: 6px;
ul{
list-style: none;
padding-left: 0;
border: 1px solid $color-1;
border-radius: 10px;
li{
font-size: 1rem;
font-weight: normal;
}
}
a.nav-link {
&:hover{
background-color: $color-1;
color: $color-3
}
}
}
}
.dropdown-menu {
animation-name: Mzoom;
animation-duration: .5s;
}
@keyframes Mdown {
from{
opacity: 0;
transform: translate(0,20px);
-webkit-transform: translate(0,20px);
}
to{
opacity: 1;
}
}
@keyframes Mleft {
from{
opacity: 0;
transform: translate(20px,0);
-webkit-transform: translate(20px,0);
}
to{
opacity: 1;
}
}
@keyframes Mzoom {
from{
opacity: 0;
transform: scale3d(0.2,0.2,0.2);
-webkit-transform: scale3d(0.2,0.2,0.2);
}
50%{
opacity: 1;
}
}
@keyframes Mroll {
from{
opacity: 0;
transform: translate3d(-100%,0,0) rotate3d(0,0,1,-90deg);
-webkit-transform: translate3d(-100%,0,0) rotate3d(0,0,1,-90deg);
}
to{
opacity: 1;
transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
}
}
.carousel-indicators{
li{
border-radius: 50%;
width: 10px;
height: 10px;
}
li.active {
width: 14px;
height: 14px;
background-color: $color-1;
margin-top: -2px;;
}
}
.w100 {font-weight: 100 !important;}
.w300 {font-weight: 300 !important;}
.w400 {font-weight: 400 !important;}
.w500 {font-weight: 500 !important;}
.w700 {font-weight: 700 !important;}
.w900 {font-weight: 900 !important;}
.nav-colored{background-color: $primary;}
.nav-transparent {background-color: transparent;}
.MeenyNavTrs {
transition: 1s;
-webkit-transition: 1s;
}
@keyframes MfadeInDown{
0% {
opacity: 0;
-webkit-transform: translate3d(0,-100%,0);
transform: translate3d(0,-100%,0);
}
40%{
opacity: 1;
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
}
.MfadeInDown{
animation-name: MfadeInDown;
animation-duration: 3s;
animation-delay: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
::-webkit-scrollbar {
width: 0.25vw;
height: 0.25vw;
}
::-webkit-scrollbar-thumb {
background: $color-1;
}
::-webkit-scrollbar-track {
background: $light;
}
//Internet explorer
Body{
scrollbar-arrow-color: $color-1;
scrollbar-face-color: $color-1;
scrollbar-track-color: lighten($color-1, 40%);
scrollbar-3dlight-color: lighten($color-1, 20%);
scrollbar-highlight-color: lighten($color-1, 15%);
scrollbar-shadow-color: lighten($color-1, 10%);
scrollbar-darkshadow-color: lighten($color-1, 5%);
}
.Mside{
position: fixed;
width: 250px;
height: 100vh;
z-index: 2000;
padding: 20px;
transition: .5s;
-webkit-transition: .5s;
transition-timing-function: ease-in-out;
ul > li > a{
color: $white;
&:hover {
color: $color-3;
}
}
}
.Fside {
position: fixed;
z-index: 2001;
width: 0;
overflow: hidden;
height: 100vh;
background-color: rgba(0,0,0, 0.9);
transition: .5s;
//transform: rotate(45deg);
-webkit-transition: .5s;
transition-timing-function: ease-in-out;
.Fnav{
//transform: rotate(-45deg);
}
ul.nav{
font-size: 2em;
font-weight: bolder;
a{
&:hover {
color: $color-3;
}
}
}
}
.section2 {
clip-path: polygon(0 0, 100% 0%, 100% 85%, 50% 100%, 0 85%);
}
body > div.section3.row.m-2 > div:nth-child(1) > div {
overflow: visible;
}
.card {
overflow: hidden;
img{
clip-path: polygon(0 0, 100% 0%, 100% 85%, 50% 100%, 0 85%);
//clip-path: url(#SVGPath);
transition: .3s ease-in-out;
-webkit-transition: .3s ease-in-out;
&:hover {
transform: scale(1.2) rotate(15deg);
-webkit-transform: scale(1.2) rotate(15deg);;
}
}
&:hover{
box-shadow: 0 0 20px $gray-400;
cursor: pointer;
}
}
.Mblur{
filter: blur(5px);
-webkit-filter: blur(5px);
transition: .3s ease-in-out;
-webkit-transition: .3s ease-in-out;
&:hover{
filter: blur(0);
-webkit-filter: blur(0);
}
}
.Mgray{
filter: grayscale(100%) blur(5px);
-webkit-filter: grayscale(100%) blur(5px);
transition: .3s ease-in-out;
-webkit-transition: .3s ease-in-out;
&:hover {
filter: grayscale(0) blur(0);
-webkit-filter: grayscale(0) blur(0);
}
}
.Mscale2X {
z-index: 1000;
transition: .5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
-webkit-transition: .5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
&:hover {
transform: scale(1.4);
}
}
main.js
$(document).ready( $(function(){
var navbtn = $('.navbar-toggler');
var nav = $('.navbarwrap');
$(navbtn).click(function(){
$(navbtn).toggleClass('active');
})
$(window).scroll(function(){
var scroll = $(window).scrollTop();
if(scroll >= 100) {
nav.removeClass('nav-transparent py-4').addClass('nav-colored');
}else{
nav.removeClass('nav-colored').addClass('nav-transparent py-4');
}
})
}))
function Msidebar(loca){
var Wwidth = document.body.clientWidth;
var aside = document.getElementById('aside');
if(loca=='L'){
aside.style.left = '0px';
}else if(loca=='R'){
aside.style.left = (Wwidth - 250) + 'px';
}else{//Close
aside.style.left = '-250px';
}
}
function Fsidebar(loca){
var fside = document.getElementById('fside');
if(loca=='L'){
fside.style.width = '100%';
}else{//Close
fside.style.width = '0';
}
}
const sitemap = {
"mainMenu":[
{"name": "About Us", "Link": "http://www.meeny.com", "sub": null},
{"name": "Business", "Link": "http://www.meeny.com", "sub": null},
{"name": "Products", "Link": "http://www.meeny.com", "sub": [
{"name": "Category 1", "Link": "http://www.meeny.com", "sub": null},
{"name": "Category 2", "Link": "http://www.meeny.com", "sub": null},
{"name": "Category 3", "Link": "http://www.meeny.com", "sub": null},
{"name": "Category 4", "Link": "http://www.meeny.com", "sub": null}
]},
{"name": "Contact Us", "Link": "http://www.meeny.com", "sub": [
{"name": "SubMenu 1", "Link": "http://www.meeny.com", "sub": null},
{"name": "SubMenu 2", "Link": "http://www.meeny.com", "sub": null}
]},
{"name": "Investing", "Link": "http://www.meeny.com", "sub": null},
{"name": "Press", "Link": "http://www.meeny.com", "sub": null}
],
"footMenu":[]
}
function MParseMnu(ulname, Mnuobj, sid){
var obj = Mnuobj;
//console.log(obj);
for(var i=0; i < obj.length; i++){
var subMnuid = sid + i;
if(obj[i].sub != null){
ulname.innerHTML += '<li class="nav-item"><a class="nav-link" href="'+obj[i].Link+'">'+obj[i].name+'</a><ul id="'+subMnuid+'"></ul>';
var subMnuid = document.getElementById(subMnuid);
MParseMnu(subMnuid, obj[i].sub);
}else{
ulname.innerHTML += '<li class="nav-item"><a class="nav-link" href="'+obj[i].Link+'">'+obj[i].name+'</a></li>';
}
}
}
function B4ParseMnu(ulname, Mnuobj, sid, dropdown){
var obj = Mnuobj;
//console.log(obj);
for(var i=0; i < obj.length; i++){
var subMnuid = sid + i;
var DsubMnuid = 'Drop_'+subMnuid;
if(obj[i].sub != null){
ulname.innerHTML += '<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="'+DsubMnuid+'" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'+obj[i].name+'</a><div class="dropdown-menu" aria-labelledby="'+DsubMnuid+'" id="'+subMnuid+'">';
var subMnuid = document.getElementById(subMnuid);
B4ParseMnu(subMnuid, obj[i].sub, subMnuid, 'dropdown');
}else if(dropdown=='dropdown'){
ulname.innerHTML += '<a class="dropdown-item" href="'+obj[i].Link+'">'+obj[i].name+'</a>';
}else{
ulname.innerHTML += '<li class="nav-item"><a class="nav-link" href="'+obj[i].Link+'">'+obj[i].name+'</a></li>';
}
}
//ulname.innerHTML += '</li>';
}
window.onload = function (){
var Mmenu = document.getElementById("Mmenu");
MParseMnu(Mmenu, sitemap.mainMenu, 'Mmenu');
var Fsidemenu = document.getElementById("Fsidemenu");
B4ParseMnu(Fsidemenu, sitemap.mainMenu, 'Fsidemenu', '');
var sidemenu = document.getElementById("sidemenu");
B4ParseMnu(sidemenu, sitemap.mainMenu, 'sidemenu', '');
var tmenu = document.getElementById("tmenu");
MParseMnu(tmenu, sitemap.mainMenu, 'tmenu');
var tmenu1 = document.getElementById("tmenu1");
B4ParseMnu(tmenu1, sitemap.mainMenu, 'tmenu1', '')
var MainMnu = document.getElementById("MainMnu");
B4ParseMnu(MainMnu, sitemap.mainMenu, 'MainMnu', '')
}