Interactive website: push menu using notepad and chrome


i've been trying to redo the push menu using notepad and chrome browser. the code was working perfectly when i tried it in codecademy. but when i tried it on notepad and chrome it didnt work. i just copied everything i did in codecademy. i made .html .js and . css files. the display is the same but there is no fa fa bars visible beside the menu and nothing happens when i clicked menu. is there anything i need to download for it to work outside codecademy. thanks!


In your index.html file
in the <head></head> section
you will have to change

 <link href="//" rel="stylesheet">


<link href="" rel="stylesheet">

at the bottom of your <body></body> section

<script src="//"></script>


<script src=""></script>


Alternatively, run a server and access it through localhost.

A really simple way to do this if you have python installed is to navigate to the directory with the files and run python3 -m http.server or python2 -m SimpleHTTPServer

The problem is that the browser will look for the file with the same protocol as it got the html from, which is directly from the file system in your case. Specifying the protocol, or serving the website with http therefore fixes the problem.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.