css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="navbar">
  <a href="#top" class="nav-brand vcenter-parent" title="House of Hong">
    <img class="vcenter" src="http://placehold.it/800x150" />
  </a>
  <ul class="nav-menu" role="menu">
    <li role="menu-item"><a href="#about">Book a table</a></li>
    <li role="menu-item"><a href="#menu">Explore our menu</a></li>
    <li role="menu-item"><a href="#event">Event catering</a></li>
    <li role="menu-item"><a href="#news">What's new</a></li>
  </ul>
  <div class="nav-hamburger js-nav-trigger" data-target="#jsNavTarget" title="Expand navigation"><i class="js-nav-trigger-icon catif catif-hamburger"></i></div>
</div>
<div class="nav-overlay js-nav vcenter-parent" id="jsNavTarget">
  <nav class="vcenter">
    <ul class="nav-menu" role="menu">
      <li role="menu-item"><a href="#about" class="text-feature">Book a table</a></li>
      <li role="menu-item"><a href="#menu" class="text-feature">Explore our menu</a></li>
      <li role="menu-item"><a href="#event" class="text-feature">Event catering</a></li>
      <li role="menu-item"><a href="#news" class="text-feature">What's new</a></li>
    </ul>
  </nav>
</div>

<div class="body">
  <div id="top"></div>
  <section class="about" id="about">
    <div class="container">
      <div class="row">
        <div class="about-hero">
          <img class="img-responsive center-block" src="http://placehold.it/500" alt="House of Hong Logo" title="House of Hong" />
        </div>
        <p class="show-above-xs">House of Hong is a Chinese restaurant located in in the heart of the International District. Our emphasis is authentic Chinese food made with fresh ingredients, and Cantonese traditional and modern dim sum. </p>
        <p class="show-above-md">Po and Amy Lee have been in the restaurant business for over 40 years in Seattle, with almost 20 years at the House of Hong. They retired several years ago, but still had the itch to open yet another restaurant with their passion for sharing their
          heritage through food and love for eating. They could not stay out the restaurant business for long, since they have come out of retirement to reopen the House of Hong (which has been in Seattle for close to 40 years).</p>
        <a href="tel:2066227997" title="Book a table" class="btn btn-ghost cta six columns offset-by-three about-button">Book a table<br>(206) 622-7997</a>
      </div>
      <div class="row text-center">
        <div class="four columns business-info location vcenter-parent">
          <div class="vcenter">
            <p class="info-title">Location</p>
            <p class="info-body"><a href="https://goo.gl/maps/ydAERi9fynx" target="_blank" title="Open in map">409 8th Ave. S. <br> Seattle, WA 98104 <br> Parking available</a></p>
          </div>
        </div>
        <iframe class="eight columns business-info map" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1473.323041956724!2d-122.32376441578808!3d47.59879519998632!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x54906abc2396e0b9%3A0x3d8cbaab8f2bc12c!2sHouse+of+Hong+Restaurant!5e0!3m2!1sen!2sus!4v1470438796628"
          frameborder="0" allowfullscreen></iframe>
      </div>
      <div class="row text-center">
        <div class="four columns business-info status vcenter-parent">
          <div class="vcenter">
            <p class="info-title" id="openStatus">Status</p>
          </div>
        </div>
        <div class="eight columns business-info hours vcenter-parent">
          <div class="vcenter">
            <p class="info-title">Hours</p>
            <p class="info-body">Open: 9:30 am - 10:00 pm (Everyday) <br> Dimsum: 9:30 am - 4:00 pm (Everyday)</p>
          </div>
        </div>
      </div>
    </div>
  </section>
  <section class="menu" id="menu">
    <div class="container">
      <h1>Explore our menu</h1>
      <div class="categorys">
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
        <figure class="category">
          <img class="img-responsive" src="http://placehold.it/500" alt="Dimsum" />
          <figcaption><a href>Dimsum</a></figcaption>
        </figure>
      </div>
    </div>
  </section>
  <section class="event" id="event">
    <div class="container">
      <h1>Event catering</h1>
      <div class="row">
        <p>Whether you are looking for the perfect place to entertain friends, celebrate a special occasion, or hold a business function, our delicious food, welcoming atmosphere, and friendly, attentive service make House of Hong an ideal venue. With 3000
          sqft dining space, we can easily accomendate 500 guests. We have an indoor stage equipped with basic stereo system that is good for MC, speech, and simple performance. Our private dining room, located on the second floor of the restaurant, can
          accommodate from 20 to 75 guests. We also have a service bar to complement a variety of occasions.</p>
        <p>We offer opportunities to reserve the entire restaurant for a large private party, wedding reception, or fundraising event. Private parties range from casual buffets, to swank cocktail receptions, to elegant dinners. We are very happy to work
          with you to meet your specific needs, and to give you the kind of personal attention.</p>
        <a href="tel:2066227997" title="Call for details" class="btn btn-ghost cta about-button six columns offset-by-three">Call for details <br> (206) 622-7997</a>
      </div>
    </div>
  </section>
  <section class="news" id="news">
    <div class="container">
      <h1>What's new</h1>
      <div class="timeline">
        <h2 class="timeline-year">2016</h2>
        <div class="timeline-story">
          <div class="date">
            <span class="label">Aug 5</span>
          </div>
          <div class="content">
            <img class="picture" src="http://placehold.it/500" />
            <div class="text">
              <a href>Lorem ipsum</a>
              <p>Lorem ipsum dolor sit amet, felis incidunt eu, tincidunt velit proin, pellentesque accumsan urna.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>
<footer class="footer">
  <div class="footer-top">
    <div class="container">
      <ul class="social-list">
        <li><a href><i class="catif catif-instagram"></i></a></li>
        <li><a href><i class="catif catif-facebook"></i></a></li>
        <li><a href><i class="catif catif-twitter"></i></a></li>
        <li><a href><i class="catif catif-mail"></i></a></li>
      </ul>
      <p class="address">House of Hong Restaurant <br> 409 8th Ave S <br> Seattle, WA 98040 <br> (206) 622-7997</p>
      <ul class="nav-menu" role="menu">
        <li role="menu-item"><a href="#about">Book a table</a></li>
        <li role="menu-item"><a href="#menu">Explore our menu</a></li>
        <li role="menu-item"><a href="#event">Event catering</a></li>
        <li role="menu-item"><a href="#news">What's new</a></li>
      </ul>
      <p>Gourmet Chinese cuisine and Cantonese dim sum, crafted with <span class="catif catif-heart" title="love"></span> in Seattle.</p>
    </div>
  </div>
  <div class="footer-bottom">
    <div class="container">
      <p><a href="http://chryw.catenology.com" target="_blank" rel="noopener noreferrer" title="Catenology"><i class="catif catif-logo-simple"></i><span class="label">Catenology</span></a> powered website</p>
      <p class="copyright text-muted">© House of Hong Restaurant | All rights reserved</p>
    </div>
  </div>
</footer>
<a href="#top" class="go-to-top"><i class="catif catif-chevron-up"></i><span class="label">Go to top</span></a>
            
          
!
            
              @font-face {
  font-family: "catif";
  src: url("https://rawgit.com/Catenology/catfw/master/doc/files/fonts/catif.eot");
  src: url("https://rawgit.com/Catenology/catfw/master/doc/files/fonts/catif.eot?#iefix") format("eot"), url("https://rawgit.com/Catenology/catfw/master/doc/files/fonts/catif.woff") format("woff"), url("https://rawgit.com/Catenology/catfw/master/doc/files/fonts/catif.ttf") format("truetype"), url("https://rawgit.com/Catenology/catfw/master/doc/files/fonts/catif.svg#catif") format("svg");
  font-weight: normal;
  font-style: normal;
}


/*
placeholder urls:
//hero video
https://dl.dropboxusercontent.com/s/ptoo9don12t5t6n/ph-video-01.gif?dl=0
https://dl.dropboxusercontent.com/s/d9uycqowgcx2k8y/ph-video-03.gif?dl=0
//hero static
https://dl.dropboxusercontent.com/s/kp0tia5pyig3r31/ref-11.jpg?dl=0
//logo white
https://dl.dropboxusercontent.com/s/9tn8nbruf8pkikt/logo_rgb_white.svg?dl=0
//logotype white
https://dl.dropboxusercontent.com/s/xdx4cp4ehlqzapm/logotype_rgb_white.svg?dl=0
//open status background
https://dl.dropboxusercontent.com/s/8kaswt27uc634cm/ref-09.png?dl=0
//info background
https://dl.dropboxusercontent.com/s/ezzcwqv7u6l9e4e/ref-14.png?dl=0
//menu background
https://dl.dropboxusercontent.com/s/s4yd5wqi16q2iw3/ref-38.jpg?dl=0
//event background
https://dl.dropboxusercontent.com/s/xzch4oo1rei4ewb/ref-12.png?dl=0
//contact background
https://dl.dropboxusercontent.com/s/52uect5edhmnhoz/ref-14.png?dl=0
*/

//variables
$color-brand: #6b0c22;
$color-accent: #fdbe52;
$color-grey: #d8d8d8;
$color-grey-dark: #222222;
$color-grey-light: #f0f0f0;
$color-danger: #F2384A;
$color-warning: #FFE066;
$color-info: #2C99CE;
$color-success: #50B273;
$spacing-unit: 16px;
$spacing-unit-sm: 8px;
$spacing-unit-xs: 4px;
$spacing-unit-md: 24px;
$spacing-unit-lg: 32px;
$spacing-unit-xl: 64px;
$breakpoint-xs: 321px;
$breakpoint-sm: 551px;
$breakpoint-md: 751px;
$breakpoint-lg: 1081px;
$breakpoint-xl: 1921px;
$hero-height-xs: 500px;
$hero-height-md: 800px;
//mixins
@mixin hyperlink($type:brand) {
  @if($type==brand) {
    &,
    &:visited {
      color: $color-brand;
    }
    &:hover,
    &:focus,
    &.active {
      color: lighten($color-brand, 20%);
    }
  }
  @if ($type==accent) {
    &,
    &:visited {
      color: $color-accent;
    }
    &:hover,
    &:focus,
    &.active {
      color: lighten($color-accent, 20%);
    }
  }
  @if ($type==white) {
    &,
    &:visited {
      color: #fff;
    }
    &:hover,
    &:focus,
    &.active {
      color: lighten($color-brand, 20%);
    }
  }
}

@mixin transform($transforms) {
  -moz-transform: $transforms;
  -o-transform: $transforms;
  -ms-transform: $transforms;
  -webkit-transform: $transforms;
  transform: $transforms;
}

@mixin transition($args...) {
  -webkit-transition: $args;
  -moz-transition: $args;
  -ms-transition: $args;
  -o-transition: $args;
  transition: $args;
}

@mixin background-size($size:cover) {
  -webkit-background-size: $size;
  -moz-background-size: $size;
  -o-background-size: $size;
  background-size: $size;
}

@mixin link-underline-expand($color:$color-brand) {
  &,
  &:visited {
    color: $color;
  }
  &:before,
  &:after {
    content: "";
    display: block;
    position: absolute;
    border-bottom: .1em solid $color;
    margin-left: auto;
    margin-right: auto;
    top: 100%;
    @include transition(all,
    .3s,
    ease);
    left: 50%;
    @include transform(translateX(-50%));
    width: 0;
  }
  &:hover:before,
  &:hover:after {
    width: 100%;
  }
}

@mixin vcenter-parent {
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

@mixin vcenter {
  position: relative;
  top: 50%;
  transform: perspective(1px) translateY(-50%);
}

//main
html,
body {
  padding: 0;
  margin: 0;
  color: #fff;
  &:selection,
  &:-moz-selection {
    background: #ffb7b7;
  }
  &,
  * {
    box-sizing: border-box;
  }
  ::selection {
    background: fade-out($color-brand, .5);
    /* WebKit/Blink Browsers */
  }
  ::-moz-selection {
    background: fade-out($color-brand, .5);
    /* Gecko Browsers */
  }
}

//nav
.navbar {
  background-color: $color-brand;
  position: fixed;
  z-index: 1000;
  height: 64px;
  width: 100%;
  box-shadow: 0 2px 16px fade-out(#000, 0.5);
  display: none;
  &> .nav-menu {
    display: none;
    position: absolute;
    top: $spacing-unit;
    right: $spacing-unit;
    @media screen and (min-width: $breakpoint-md) {
      display: block;
    }
  }
}

.nav-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  &>li {
    a {
      @include link-underline-expand(#fff);
    }
  }
  @media screen and (min-width: $breakpoint-md) {
    &>li {
      display: inline-block;
      vertical-align: middle;
      //divider
      &:before {
        display: inline-block;
        content: "|";
        margin: 0 $spacing-unit;
      }
      //remove divider from the first item
      &:first-child {
        &:before {
          content: none;
        }
      }
    }
  }
}

.nav-brand {
  display: inline-block;
  height: 64px;
  position: absolute;
  top: 0;
  left: $spacing-unit;
  &>* {
    height: 48px;
  }
  &>svg.logo {
    fill: #fff;
    @include transition(fill,
    ease,
    .3s);
    &:hover,
    &:focus,
    &.active {
      fill: $color-accent;
    }
  }
}

.nav-hamburger {
  display: inline-block;
  position: absolute;
  top: 0;
  right: $spacing-unit;
  font-size: 28px;
  width: 32px;
  height: 32px;
  line-height: 64px;
  border-radius: 2px;
  text-align: center;
  cursor: pointer;
  z-index: 1000;
  @include transition(color,
  ease,
  .3s);
  &:hover,
  &:focus {
    color: $color-accent;
  }
  @media screen and (min-width: $breakpoint-md) {
    display: none;
  }
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  background-color: fade-out($color-brand, .2);
  z-index: 100;
  text-align: center;
  @include transition(height,
  ease,
  .3s);
  &.open {
    height: 100%;
  }
  .nav-menu {
    &>li {
      &:not(first-child) {
        margin-top: $spacing-unit-lg;
      }
    }
  }
}

//main
section {
  @include background-size(cover);
  position: relative;
  @include transition(background-image,
  1s);
  font-size: 20px;
  //dark mask
  &:before {
    display: block;
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: fade-out(#000, .15);
  }
  &>.container {
    padding-top: 96px;
    padding-bottom: $spacing-unit-xl;
    &>h1 {
      font-size: 2em;
      margin-bottom: $spacing-unit-xl;
    }
  }
}

//about
.about {
  background: url(https://dl.dropboxusercontent.com/s/kp0tia5pyig3r31/ref-11.jpg?dl=0) no-repeat center center fixed;
  @media screen and (min-width: $breakpoint-md) {
    background: url(https://dl.dropboxusercontent.com/s/d9uycqowgcx2k8y/ph-video-03.gif?dl=0) no-repeat center center fixed;
    @include background-size(cover);
  }
}

.about-hero {
  width: 100%;
  margin-bottom: $spacing-unit-xl;
}

.about-history {
  display: none;
  @media screen and (min-width: $breakpoint-sm) {
    display: block;
  }
}

.about-button {
  margin-top: $spacing-unit-lg;
  margin-bottom: $spacing-unit-lg;
}

.btn-ghost.cta {
  line-height: 1.5em;
  border-color: #fff;
  color: #fff;
  &:hover,
  &:focus,
  &.active {
    border-color: lighten($color-brand, 20%);
    color: #fff;
    background-color: $color-brand;
  }
}

.business-info {
  margin: 0;
  height: 180px;
}

.location,
.hours {
  background-color: $color-brand;
  a {
    color: #fff;
    &:hover {
      color: $color-accent
    }
  }
}

.status {
  background-color: $color-accent;
  color: $color-grey-dark;
}

.info-title {
  text-transform: uppercase;
}

.info-body {
  font-size: initial;
}

//menu
.menu {
  background: url(https://dl.dropboxusercontent.com/s/s4yd5wqi16q2iw3/ref-38.jpg?dl=0) no-repeat center center fixed;
  @include background-size(cover);
}

.categorys {
  font-size: 0; //remove space between children
  text-align: center;
  padding: $spacing-unit-lg;
  background-color: $color-brand;
}

.category {
  font-size: initial; //restore font size
  margin: 0;
  position: relative;
  @media screen and (min-width: $breakpoint-md) {
    display: inline-block;
    width: 25%;
    &:nth-child(n+5) {
      margin-top: $spacing-unit-xl;
    }
  }
  &:hover {
    figcaption {
      height: 100%;
    }
  }
  figcaption {
    position: absolute;
    display: block;
    height: 0;
    overflow: hidden;
    width: 100%;
    background-color: fade-out(#000, .5);
    left: 0;
    bottom: 0;
    @include vcenter-parent;
    @include transition(height,
    ease,
    .3s);
    a {
      @include link-underline-expand(#fff);
      @include vcenter;
      font-size: 1.5em;
    }
  }
}

//event
.event {
  background: url(https://dl.dropboxusercontent.com/s/xzch4oo1rei4ewb/ref-12.png?dl=0) no-repeat center center fixed;
  @include background-size(cover);
}

//news
.news {
  background: url(https://dl.dropboxusercontent.com/s/52uect5edhmnhoz/ref-14.png?dl=0) no-repeat center center fixed;
  @include background-size(cover);
}

.timeline {
  position: relative;
  padding-left: $spacing-unit;
  //vertical line
  &:before {
    position: absolute;
    content: "";
    top: 72px;
    left: $spacing-unit;
    width: 4px;
    height: 100%;
    background-color: $color-grey;
  }
}

.timeline-story {
  height: 120px;
  position: relative;
  border-bottom: 1px dotted fade-out($color-grey, .5);
  .date,
  .content {
    display: inline-block;
  }
  .date {
    vertical-align: middle;
    text-align: center;
    line-height: 120px;
    white-space: nowrap;
    .label {
      background-color: $color-grey;
      font-size: initial;
      padding: 2px 4px;
      color: $color-grey-dark;
    }
  }
  .content {
    padding-left: $spacing-unit;
    .picture,
    .text {
      display: inline-block;
      vertical-align: middle;
    }
    .picture {
      width: 80px;
      display: none;
      @media screen and (min-width: $breakpoint-lg) {
        display: inline-block;
      }
    }
    .text {
      padding-left: $spacing-unit;
      &> * {
        max-width: 760px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1;
      }
    }
  }
}

//footer
.footer {
  text-align: center;
  color: #fff;
  position: relative;
  a {
    color: #fff;
  }
}

ul.social-list {
  padding: 0;
  margin: 0;
  list-style: none;
  &>li {
    display: inline-block;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    background-color: $color-brand;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    margin: $spacing-unit-sm;
    @include transition(all,
    ease,
    .3s);
    a {
      color: #fff;
    }
    &:hover,
    &:focus {
      background-color: $color-accent;
      a {
        color: $color-brand;
      }
    }
  }
}

.footer-top {
  background-color: $color-grey-dark;
  padding: $spacing-unit;
  .address {
    margin-top: $spacing-unit;
  }
}

.footer-bottom {
  background-color: $color-brand;
  padding: $spacing-unit;
  a {
    @include link-underline-expand($color-accent);
  }
}

//go-to-top
.go-to-top {
  position: fixed;
  display: block;
  right: 0;
  bottom: 0;
  background-color: $color-accent;
  padding: $spacing-unit-sm $spacing-unit;
  z-index: 1000;
  &,
  &:visited {
    color: $color-brand;
  }
  &:hover,
  &:focus {
    background-color: darken($color-accent, 20%);
    color: darken($color-brand, 20%);
  }
  .label {
    display: none;
    @media screen and (min-width: $breakpoint-md) {
      display: initial;
    }
  }
}

//shared
.show-above-xs {
  display: none;
  @media screen and (min-width: $breakpoint-xs) {
    display: block;
  }
}

.show-above-sm {
  display: none;
  @media screen and (min-width: $breakpoint-sm) {
    display: block;
  }
}

.show-above-md {
  display: none;
  @media screen and (min-width: $breakpoint-md) {
    display: block;
  }
}

.vcenter-parent {
  @include vcenter-parent;
}

.vcenter {
  @include vcenter;
}

i {
  & ~ .label {
    margin-left: $spacing-unit-sm;
  }
}
            
          
!
            
              'use strict'
let main = () => {
  let smoothScroll = () => {
    let anchors = $('a[href*="#"]:not([href="#"])');
    anchors.on('click', (e) => {
      let trigger = e.currentTarget;
      if (location.pathname.replace(/^\//, '') == trigger.pathname.replace(/^\//, '') && location.hostname == trigger.hostname) {
        let target = $(trigger.hash);
        target = target.length ? target : $('[name=' + trigger.hash.slice(1) + ']');
        if (target.length) {
          $('html, body').animate({
            scrollTop: target.offset().top
          }, 1000);
          return false;
        }
      }
    });
  };

  let toggleNav = () =>{
    //click hamburger to toggle the nav
    $('.js-nav-trigger').on('click', (e)=>{
      let trigger = $(e.currentTarget);
      let icon = trigger.find('.js-nav-trigger-icon');
      let nav = $(trigger.data('target'));
      nav.toggleClass('open');
      icon.toggleClass('catif-hamburger catif-navigate-close');
    });
    //click to dismiss the nav
    $('.js-nav').on('click', (e) =>{
      let nav = $(e.currentTarget);
      let dismiss = $(nav.find('*').addBack());
      dismiss.on('click', (e) => {
        nav.removeClass('open');
      });
    });
  };

  let scrollNav = () => {
    let $window = $(window);
    let navbar = $('.navbar');
    $window.on('scroll', ()=> {
      if($window.scrollTop() > 100) {
        navbar.fadeIn(300);
      }
      else {
        navbar.fadeOut(300);
      }
    });
  };

  let scrollGoToTop = () => {
    let $window = $(window);
    let goToTop = $('.go-to-top');
    $window.on('scroll', () => {
      if($window.scrollTop() > 200) {
        goToTop.fadeIn(300);
      }
      else {
        goToTop.fadeOut(300);
      }
    });
  };
  smoothScroll();
  scrollNav();
  scrollGoToTop();
  toggleNav();
};
main();

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console