How to create mobile slide menu - the simple example

Posted by admin on Tue, 10/31/2017 - 04:58

Here is your HTML:

<div class="menu">
  <div class="menu-open"></div>
  <div class="menu-content">
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
    </ul>
    <div class="menu-close"></div>
  </div>
</div>

Here is the CSS:

.menu-content {
  position: fixed;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 200px;
  height: 100%;
  transform: translateX(-100%); /* Скрываем меню */
  overflow-y: auto;
  transition: 0.2s;
}
.menu-opened .menu-content {
  transform: none; /* Показываем меню */
}

Javascript:

$(function() {
  $('.menu-open').on('click', function() {
    $('.menu').toggleClass('menu-opened');
  });
  $('.menu-close').on('click', function() {
    $('.menu-open').click();
  });
});
×

Hey! Don't miss a new cool stuff!

Comments

inticleni (not verified)

hemp oil for pain cbd oil store buy hemp oil

inticleni (not verified)

hemp oil for pain cbd oil store buy hemp oil

inticleni (not verified)

cbd oil at walmart http://buycbdoil11.com/ hemp oil hemp cbd oil cbd gummies walmart

inticleni (not verified)

cbd oils http://buycbdoil11.com/ - buy hemp oil cbd cream hemp cbd

inticleni (not verified)

http://buycbdoil11.com/ hemp oil for pain cbd drops cbd oil store cannabis oil

inticleni (not verified)

cannabis oil cbd oil hemp oil cbd oils http://buycbdoil11.com/ - cbd oil for sale

inticleni (not verified)

cbd capsules cbd oil store cbd hemp best cbd oil

inticleni (not verified)

http://cbdoilglk.com/ cbd products http://cbdoilglk.com/ - cbd cbd products

inticleni (not verified)

http://cbdoilglk.com/ cbd oil for sale cbd near me hemp oil for pain cbd vape

inticleni (not verified)

http://cbdoilglk.com/ cbd oil for sale cbd near me hemp oil for pain cbd vape

inticleni (not verified)

hemp oil http://cbdoilglk.com/ hemp cbd oil cbd oils cbd oil for sale

inticleni (not verified)

cbd capsules cbd oil benefits cbd oil benefits cbd oil store

inticleni (not verified)

cbd capsules cbd oil benefits cbd oil benefits cbd oil store

inticleni (not verified)

http://buycbdoilwalm.com/ cbd oil for pain http://buycbdoilwalm.com/ - buy cbd cbd oil for pain

inticleni (not verified)

cbd vape http://buycbdoilwalm.com/ - cbd online cbd oil for sale cbd cbd store

inticleni (not verified)

best cbd oil cannabis oil cbd for dogs cbd tinctures

inticleni (not verified)

cbd tinctures http://buycbdoilwalm.com/ - cbd tinctures cbd near me hemp cbd oil

inticleni (not verified)

cbd tinctures http://buycbdoilwalm.com/ - cbd tinctures cbd near me hemp cbd oil

inticleni (not verified)

cbd oil benefits cbd pure cbd online

inticleni (not verified)

cbd vape hemp cbd oil cbd pills cbd store

inticleni (not verified)

cbd vape hemp cbd oil cbd pills cbd store

inticleni (not verified)

cbd vape hemp cbd oil cbd pills cbd store

inticleni (not verified)

http://buycbdoilwalm.com/ hemp oil for pain cbd vape hemp oil for pain cbd for sale

inticleni (not verified)

http://buycbdoilwalm.com/ cbd cream buy cbd oil online cbd tinctures cbd oil online

inticleni (not verified)

http://buycbdoilonline.us.com/ hemp cbd oil hemp oil for pain cbd oil for sale best cbd oil

enetibliole (not verified)

http://cbdoilrx.us.com/ cbd hemp http://cbdoilrx.us.com/ - medterra cbd cbd capsules

enetibliole (not verified)

http://cbdoilrx.us.com/ cbd hemp http://cbdoilrx.us.com/ - medterra cbd cbd capsules

inticleni (not verified)

hemp cbd oil http://buycbdoilonline.us.com/ - hemp oil for pain hemp oil for pain cbd capsules

enetibliole (not verified)

http://cbdoilrx.us.com/ buy hemp oil cbd near me cbd oil for pain cbd oil

inticleni (not verified)

cbd pills hemp cbd oil cbd oil for dogs cbd for dogs http://buycbdoilonline.us.com/ - cbd capsules

inticleni (not verified)

cbd pills hemp cbd oil cbd oil for dogs cbd for dogs http://buycbdoilonline.us.com/ - cbd capsules

erectile dysfun... (not verified)

Ylsizb vgeepa cheap erectile dysfunction pills online best otc ed pills

inticleni (not verified)

cbd pure cdb oils cbd oil benefits cbd online http://buycbdoilonline.us.com/ - pure cbd oil

inticleni (not verified)

cbd pure cdb oils cbd oil benefits cbd online http://buycbdoilonline.us.com/ - pure cbd oil

inticleni (not verified)

http://buycbdoilonline.us.com/ cbd oil store cbd pure cbd hemp cdb oils

inticleni (not verified)

http://buycbdoilonline.us.com/ cbd oil store cbd pure cbd hemp cdb oils

inticleni (not verified)

pure cbd oil cbd medic cbd capsules

erectile dysfun... (not verified)

Umtcxc ilgwje cheapest ed pills buy ed pills online

best erectile d... (not verified)

Cwuefl kgvxlp ed medications erectile dysfunction drugs

best erection pills (not verified)

Epvwsu teabxa cheapest ed pills online online ed pills

best erection pills (not verified)

Epvwsu teabxa cheapest ed pills online online ed pills

best ed pills n... (not verified)

Utgatq gnplxf cialis for sale ed pills

Estherchera (not verified)

Pqxjyv lijvbj generic viagra online Buy generic viagra online

Estherchera (not verified)

Hppfyc qykiul canadian online pharmacy canada online pharmacy

Estherchera (not verified)

Szgsth npjzre walmart pharmacy canadian online pharmacy

Estherchera (not verified)

Gkduvr gwfcjc canada pharmacy pharmacy online

Estherchera (not verified)

Exivfz bvtuzg Buy viagra Buy viagra

Estherchera (not verified)

Exivfz bvtuzg Buy viagra Buy viagra

Estherchera (not verified)

Rgcwfq vjnawd viagra generic Viagra overnight shipping

Estherchera (not verified)

Bljtad reszeg Buy generic viagra online Order viagra without prescription