Smart phone toggle menu

To make responsive toggle menu……

$('.menuOpen').click(function(){
        $('.header').slideToggle();
        if($('.menuOpen').hasClass('fa-bars')){//This condition branch is important!!
            $('.menuOpen').removeClass('fa-bars');
            $('.menuOpen').addClass('fa-times');
        }else{
            $('.menuOpen').removeClass('fa-times');
            $('.menuOpen').addClass('fa-bars');
        };
    });
<div class="headFix">
  <h1 class="logo clearfix">
    <img src="/img/common/logo.svg" alt="" width="300" height="300" class="logomark">
    <img src="/img/common/brand_name.svg" alt="" width="280" height="80" class="logoname" alt="Plant Hagalaz">
  </h1>
  <i class="fa fa-bars sp menuOpen" aria-hidden="true"></i>
</div>
<nav id="gNavi">
  <ul class="clearfix">
    <li><a href="#">Plant H</a></li>
    <li><a href="#">service/a></li>
    <li><a href="#">contact</a></li>
    <li><a href="#" target="_blank">blog</a></li>
  </ul>
</nav>
.column, .lower {
    height: 100%;
}
.column .lower .header {
    padding: 10px;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    float: right;
    width: 150px;
    height: 100%;
    position: relative;
}
.column .lower .header .logo {
    position: relative;
    z-index: 50;
}
.column .lower .header .logo .logomark {
    background-color: #fff;
}
.column .lower .header .logo,
.column .lower .header .logo .logomark {
    border-radius: 50%;
    width: 150px;
    height: 150px;
}
.column .lower .header .logo .logoname {
    margin-top: -100px;
    margin-left: 19px;
    width: 113px;
    height: 49px;
}
.column .lower .header .copyright {
    display: inline-block;
    position: absolute;
    bottom: 34px;
    left: 5px;
}

 @media screen and ( max-width:736px){
     .column, .lower {
         height: auto;
     }
     .column .lower .header {
        padding: 0 0 60px;
        border: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        float: none;
        width: 100%;
        height: auto;
        display: none;
        background: #fff;
        position: fixed;
        top: 80px;
        right: 0;
        z-index: 60;
    }
    .column .lower .header .logo {
        margin: 15px auto 0;
    }
    .column .lower .header .logo .logoname {
        margin-left: -1px;
    }
    .column .lower .header .copyright {
        margin-left: -172px;
        bottom: 8px;
        left: 50%;
    }
        @media screen and (orientation: landscape) {
            .column .lower .header {
                padding-bottom: 20px;
                height: 50%;
               z-index: 95;
           }
           .column .lower .header .logo {
               margin: 5px 0 0 15px;
               width: 100px;
               height: 100px;
               float: left;
           }
           .column .lower .header .logo .logomark {
               width: 100px;
               height: 100px;
           }
           .column .lower .header .logo .logoname {
               margin-top: -64px;
               width: 80px;
               height: 30px;
           }
            .column .lower .header .copyright {
                bottom: 0;
                left: 182px;
            }
        }
}

HTML/CSS, jQuery

Posted by Nanashi