How to code a slide out navigation | Part 2: The JavaScript

Time to dive into JavaScript to add some interactivity to our website! It’s a relatively simple bit of JS that we’re adding, so I take advantage to take a quick look at how to write an arrow function when compared to the more traditional way of writing functions. Some of the JS stuff that I look at are accessing things using querySelector, as well as adding and toggling classes with and If you’d like some more info on JavaScript arrow functions (and ES6 in general), this is a nice place to start: Some people might blow a fuse because I don’t use semi-colons in my JS, but here is what convinced me not to bother with them: Also, since I am using ES6 in this, you might want to use Babel: ... #HTML #CSS #How_to #Kevin_Powell_web #website_portfolio #css_grid_layout_tutorial #how_to_build_a_website_with_css_grid #css_grid_tutorial #How_to_create_a_portfolio_website 20171108 TzB_KUn-30w
Back to Top