How to Create a Animated Sidebar Menu using HTML, CSS & JavaScript.

Поделиться
HTML-код
  • Опубликовано: 21 июн 2017
  • Learn how to create a animated sidebar menu with HTML, CSS and JavaScript. In this video we'll walk you through step-by-step on how to add sidebar in websites/webpages.
    Code: bit.ly/3oC1MXB

Комментарии • 437

  • @Codingflag
    @Codingflag  3 года назад +3

    Code: bit.ly/3l4Mzga

    • @Jamesomnipotent
      @Jamesomnipotent 3 года назад

      Hi, instead of using onclick() within the HTML, I assigned 'id=toggleID' to the div of the burger menu , and then i Did this in the JavaScript file but it didnt work like the onclick() method.
      let toggleMyMenu = document.getElementById("toggleID");
      toggleMyMenu.addEventListener("click", () => {
      document.getElementById("sidebar").classList.toggle("active");
      });
      Would appreciate your reply and reasons as to why it didnt work thanks!

    • @Codingflag
      @Codingflag  3 года назад

      @@Jamesomnipotent Can you please share whole HTML and JavaScript code so that I can help

  • @sauliko31
    @sauliko31 4 года назад +3

    YOU DESERVE OSCAR MAN THIS IS MASTERPIECE THANKS!!!!!

  • @InferiPlasma
    @InferiPlasma 4 года назад +1

    A great straightforward tutorial, thanks a lot man!

  • @kapkaal
    @kapkaal 5 лет назад +1

    Nice bro jhakkas..luved it..simple and effective..👌👏

  • @ilhamr2542
    @ilhamr2542 4 года назад +2

    Thank you so much, Dude.
    You've helped me a lot.

  • @ricardopereira3058
    @ricardopereira3058 5 лет назад +1

    Thanks ;) Simple and working .. with a little tweaks it turns out really good !!

  • @Welcometomyjourney20
    @Welcometomyjourney20 6 лет назад +61

    Awesome. Small tip: no need to design hamburger menu with css. There's already html entity of that. It is '☰'.
    Just put on html directly

    • @samwheatley1529
      @samwheatley1529 6 лет назад

      Wait is there actually!

    • @Welcometomyjourney20
      @Welcometomyjourney20 6 лет назад

      yes it is. you can change its style as any html element as well, just google it: hamburger html entity!

    • @jaymcd8577
      @jaymcd8577 6 лет назад

      No Android, renders weird on Windows Chrome, Internet Explorer, etc. ?

    • @erickmclark
      @erickmclark 6 лет назад

      But how do you style it in css? I want to make it a menu. Do you just create a div class/id?

    • @jaymcd8577
      @jaymcd8577 6 лет назад +4

      Just stick with the css, I looked up what they're talking about and its a bit outdated or not well supported, a bit more head ache than its worth for a menu.

  • @farnetani1273
    @farnetani1273 6 лет назад +1

    Perfect! Congratulations!

  • @williambanks8914
    @williambanks8914 6 лет назад

    Cheers man you are awesome, been looking for a responsive sidebar nav for a while and stumbled across this. Top stuff.

  • @PraveenKumar-hu5ju
    @PraveenKumar-hu5ju 5 лет назад

    Very nice explanation
    Short and sweet

  • @Abh19021
    @Abh19021 6 лет назад +3

    You are awesome man

  • @Kish431
    @Kish431 5 лет назад +1

    Awesome video crystal clear with explanation

  • @Jamal_1842
    @Jamal_1842 5 лет назад +1

    Works great and Thanks for the tutorial :)

  • @subincbenny7140
    @subincbenny7140 6 лет назад

    Nice clean and simple. Great job man

  • @GoMathewVideo
    @GoMathewVideo 5 лет назад +20

    nicely done without using a huge amount of code!

    • @godwinyoh3700
      @godwinyoh3700 3 года назад

      it can also be done with pure css too. Was hyped when i learnt of it

  • @yoericktv9610
    @yoericktv9610 6 лет назад +2

    liked and subscribed dude you're awesome!

  • @ohunjonbakhtiyori5852
    @ohunjonbakhtiyori5852 6 лет назад

    very simple menu and understandably. Thanks

  • @MsDarsh003
    @MsDarsh003 6 лет назад +1

    Thanks for awesome video. Also thanks for not providing source code. This helped learning how it works

  • @eunhye1754
    @eunhye1754 5 лет назад +4

    It's 2:00 am and you saved my project and my life, thank u! ;^;

  • @Tendo_27
    @Tendo_27 5 лет назад

    Worked for me..thanks a ton bro!!

  • @redefamatv
    @redefamatv 3 года назад

    amazing tutorial....delivering nice content without a huge amount of code!!Pretty effective, beautiful and precisely done in just 10 minutes!....Just keep it up!!Got a subscriber!!...Hugs from Brazil!!

  • @hafsarami8592
    @hafsarami8592 5 лет назад +5

    thank you for the tutorial. does any one know if we can implement this into a SharePoint page ?

  • @bennma6306
    @bennma6306 6 лет назад +1

    thanks dude this was really useful!

  • @miteshprajapati4468
    @miteshprajapati4468 5 лет назад

    cool tutorial bro i appreciate to learn from you

  • @sarmadali77771
    @sarmadali77771 6 лет назад

    Good tutorial keep it up

  • @GlobaliwebSolution
    @GlobaliwebSolution 5 лет назад +1

    Awesome tutorial bro !!!

  • @NitinSingh9x
    @NitinSingh9x 5 лет назад

    Awesome bro please do upload this kind of stuff which web application layouts like topnav,sidenav and content page.

  • @VikashKumar-uz4td
    @VikashKumar-uz4td 2 года назад +1

    What a great video ...explained all of his code ...... And only in 10 minutes ..... U deserve a million subs ....keep it up

  • @surbhitamrakar1638
    @surbhitamrakar1638 4 года назад

    Very nice video.A clear cut explanation..well done sir.

  • @simonkalu
    @simonkalu 4 года назад

    Super awesome, cool, and concise

  • @sourishmazumdar2107
    @sourishmazumdar2107 6 лет назад

    great tutorial , make one for animated "Animated Navbar" !

  • @ytalolopes1843
    @ytalolopes1843 6 лет назад

    Você se garante Codingflag. Obrigado por nos ensinar!

  • @surajbherwani6195
    @surajbherwani6195 4 года назад

    You're awesome bro. You should create some more.

  • @felix6142
    @felix6142 4 года назад

    amazing, thank you so much!

  • @mariacristinaulloagarrido1224
    @mariacristinaulloagarrido1224 4 года назад

    wunderbar, bestens erklärt! Danke sehr!

  • @TheArthurW
    @TheArthurW 4 года назад

    Nice tutorial dude. Well explained.

  • @scarlettwang1209
    @scarlettwang1209 5 лет назад +1

    What application in video that you using to write code in widows?

  • @OstonCodeCypher
    @OstonCodeCypher 6 лет назад

    thanks for the tutorial

  • @francescocugini5401
    @francescocugini5401 6 лет назад

    Thank you! Very useful

  • @AdilMahmoodMusic
    @AdilMahmoodMusic 5 лет назад

    Bro loved your work can you just make a short video on RUclips side bar mechanics im new to java and want to learn that youtube side bar

  • @kelle_li
    @kelle_li 5 лет назад

    This is good, but how can I get my main content to start to the right of the toggle menu button, right and maybe below it as well? Thanks.

  • @ericklestrange6255
    @ericklestrange6255 5 лет назад +1

    cool. i found several things that i dindt have on my jon duckett books. first adding the onclick at the html and not on the js, second the very useful classlist (didnt know it even existed), third the icon made of span display blocks was very clever, and last the transition (ive known of its existance since its very important but its not included in most my books)

  • @CineMaverickStudios
    @CineMaverickStudios 4 года назад

    Nice Explanation

  • @dilipsarkar4959
    @dilipsarkar4959 6 лет назад +1

    good tutorial

  • @einsteincreative
    @einsteincreative 4 года назад

    what Application were you coding in? I liked the windows and the view..Its very smart workflow.

  • @keysgsgkey4587
    @keysgsgkey4587 6 лет назад

    Hey @codingflag how do you make the menu go away if you click outside the div?

  • @jeric.moreno
    @jeric.moreno 6 лет назад +1

    thanks, man !

  • @joshim9113
    @joshim9113 3 года назад

    Awesome man, you are very intelligent

  • @makimarzouki9723
    @makimarzouki9723 4 года назад +1

    simple and efficient :D

  • @alinawaz4034
    @alinawaz4034 5 лет назад

    VERYYYYYY GOOOD THANKS MANNNNNNNNN

  • @revilalar.8918
    @revilalar.8918 6 лет назад

    what application do you used when you are coding ?

  • @muralikrishna2417
    @muralikrishna2417 5 лет назад +1

    Thank u so much.

  • @brutespartan5709
    @brutespartan5709 4 года назад +1

    Great tutorial.

  • @BlackEyedPeas0078
    @BlackEyedPeas0078 5 лет назад

    Excelent!

  • @robycave9337
    @robycave9337 6 лет назад

    Thank you! May I ask you a question, please? By using your solution, in my case, the menù appears over the rest of the page, by covering the part of the page. I would like it move away the rest of the page during it appers. Does it possible? (considering that the rest of the page is another ...

  • @priyadarshini8863
    @priyadarshini8863 3 года назад

    You deserve Oscar for this video.. thank you soo soo much.

  • @hajji384
    @hajji384 3 года назад

    awesome work done thanks .

  • @marcelojose4850
    @marcelojose4850 3 года назад +1

    Show de bola amigo, me ajudou muito, muito obrigado

  • @pianoLee-sx9dx
    @pianoLee-sx9dx 5 лет назад

    This is a great tutorial! I am new to php and web development.. is it possible to leave questions here and get a reply promptly? I have found it hard to get some good decent help...

  • @DingoDingKumai
    @DingoDingKumai 4 года назад

    I love this tutorial.

  • @pounc3r782
    @pounc3r782 3 года назад

    clear explanation good video

  • @jovanadavalillo7533
    @jovanadavalillo7533 3 года назад

    Old video but still useful :D
    Thank you!

  • @mohamedhasib4260
    @mohamedhasib4260 5 лет назад

    What software u use in the video?

  • @andrewbolgov3314
    @andrewbolgov3314 3 года назад

    Wow! so simple, thx!

  • @ShwibiTech
    @ShwibiTech 5 лет назад

    INDIAN! love it.

  • @kasanag2401
    @kasanag2401 4 года назад +3

    Ha can u help me I getting this error
    togglesidebar is defined but never used.[no-unused-vars]

  • @minchin8041
    @minchin8041 6 лет назад

    I liked it!

  • @rismajw
    @rismajw 3 года назад

    you're a life saver

  • @princeraj1521
    @princeraj1521 5 лет назад

    thanks bhai you really done a great job by explaining in a simple way ... good going brother keep it up nd thanks for the help in return i will just subscribe your channel...

  • @pianoLee-sx9dx
    @pianoLee-sx9dx 5 лет назад

    Hey guys! Can someone explain to me what is position fixed? I roughly know a bit a bout it but not much... Can you still use the attributes left, right, top and bottom? Does it stay in one place because I do realise that when I use position relative, it does move things around sometimes...

  • @yamengames7120
    @yamengames7120 5 лет назад +1

    big thanks

  • @DesaiRamesh
    @DesaiRamesh 6 лет назад +1

    Good

  • @asmakhalaf4443
    @asmakhalaf4443 5 лет назад

    Thanks it works perfectly

  • @yasmeencerny4660
    @yasmeencerny4660 5 лет назад

    can we do this without fix position?

  • @niftymiller6057
    @niftymiller6057 5 лет назад +1

    good video

  • @tebqzik_music
    @tebqzik_music 6 лет назад

    Thanks for the reply . Can I ask you this what's the difference between and

    • @Joker-ie8ys
      @Joker-ie8ys 4 года назад

      Firs it Header tag and another is id used for css stuff

  • @pianoLee-sx9dx
    @pianoLee-sx9dx 5 лет назад

    How would I go about in creating another submenu on another page?

  • @yasithsarada4656
    @yasithsarada4656 3 года назад

    WELL DONE

  • @alonsoquinones6979
    @alonsoquinones6979 6 лет назад

    Hi. After clicking the links of the leftmenu, the left-menu should close so the user get full visibility of the webpage. This is especially important if the web designer has used internal anchor tags (a href “#), since the link will jump downward of page. Any thoughts of how to implement that in your specific code?

    • @Codingflag
      @Codingflag  6 лет назад

      See code & demo here - goo.gl/CxRzrM
      Insert below javascript code & replace #sidebar with your sidebar id.
      (function(){
      var sidebarAnchors = document.querySelector("#sidebar").getElementsByTagName('a');
      for(var i=0;i

  • @sameerjh3961
    @sameerjh3961 5 лет назад

    Awesome

  • @I1Ido.
    @I1Ido. Год назад +1

    mine always get overflow out of the screen don't know how to fix it.
    .sidebar, body {
    overflow-x: hidden;
    }

  • @ankitkumarvashist8991
    @ankitkumarvashist8991 5 лет назад

    it was good bro, liked and subscribe for more such videos.

    • @DesignHub4U
      @DesignHub4U 4 года назад

      For more creative designing videos subscibe us ruclips.net/video/E39cG2Eys4o/видео.html

  • @sohmy3495
    @sohmy3495 6 лет назад +1

    Hi! Thanks for the tutorial! I would like to know how i can modify these codes for android application?

    • @Codingflag
      @Codingflag  6 лет назад

      using cordova app?

    • @sohmy3495
      @sohmy3495 6 лет назад

      Yes.

    • @Codingflag
      @Codingflag  6 лет назад

      put meta viewport tag in head. & use this source code - goo.gl/Xjr5E9

    • @sohmy3495
      @sohmy3495 6 лет назад +1

      I have enter that tag in my code already. But I'm still unable to have the side bar to slide in and out from the right.
      Please help me view codes here: stackoverflow.com/questions/47000005/toggle-btn-right-navigation-side-bar-doesnt-work

    • @chapht
      @chapht 4 года назад

      @@sohmy3495 Same problems! Tracing & checking numerous times, can't find the bug.

  • @mizoapex4991
    @mizoapex4991 3 года назад

    Good one

  • @jyeo3o213
    @jyeo3o213 4 года назад

    thankyou so much😘😘😘😘

  • @schelz3878
    @schelz3878 3 года назад

    Thank you so much

  • @olansean9868
    @olansean9868 6 лет назад

    Indians are the greatest teachers believe it or not

  • @alibutt3366
    @alibutt3366 4 года назад

    Thank you friend

  • @safeermp1522
    @safeermp1522 3 года назад

    very good .helpful bro

  • @warlord_time315
    @warlord_time315 4 года назад

    woooh finally i code for 2 hours lol

  • @neon256
    @neon256 5 лет назад +1

    the javascript in sublime won't work

  • @hrishikeshawari3221
    @hrishikeshawari3221 6 лет назад

    Thanks..

  • @bigshotjeev
    @bigshotjeev 3 года назад

    Very nice video.

  • @aminostemo6179
    @aminostemo6179 6 лет назад

    thank you

  • @yasmeencerny4660
    @yasmeencerny4660 5 лет назад

    Nice

  • @mohammednihaz428
    @mohammednihaz428 5 лет назад

    in java script the classlist.toggle('active') where is no identity html or css where is it come from toggle

  • @aridev009
    @aridev009 5 лет назад

    very nice

  • @polojoy6824
    @polojoy6824 4 года назад

    thank q so much

  • @varuzhangevorgyan995
    @varuzhangevorgyan995 4 года назад +1

    Thanks you help me

  • @stefanclarke33
    @stefanclarke33 6 лет назад

    I have created a website that is a parallax website which has a landing page with information below when scrolled. The images have an opacity so it fades slightly. The hamburger menu from here was visible till i added the JS. After that i could not see it etc. Any help as to how i can make it appear above the image or something as i dont know whats happened.
    Thanks in advanced

    • @Codingflag
      @Codingflag  6 лет назад

      use z-index property by setting position of hamburger to relative

    • @stefanclarke33
      @stefanclarke33 6 лет назад

      Codingflag so css
      Position: relative;
      Z-index: 1;
      Correct?

    • @Codingflag
      @Codingflag  6 лет назад

      give max z-index according to your website control arrangement.
      try to increase z-index util you get proper expected result.

    • @stefanclarke33
      @stefanclarke33 6 лет назад +1

      Codingflag Okay, thank you