Your second assignment will test your understanding of basic javascript. You will be adding javascript to the html/css project you created for lesson one. Your javascript code will be stored in a separate file called script.js. The html source code provided contains comments with project instructions for the following...
Creating a trivia function
Handling display and logic of trivia function
Creating a small table that contains precoded movie titles and years. You will then create inputs that prompt the user for new movie titles and years, as well as a button that will add this information to the table.
You will also create a button that will toggle between showing a photo and a video clip of your celebrity on youtube.
- You will be creating a button that will delete the last row from the movieTable
- You will be creating a message board with post functionality
- You will add the ability to delete individual posts on click
Remember your sanity check! It is always important to make sure that your files are communicating. Make sure that your script and html files are communicating by creating a simple function with an alert.
oh yeah and...
GOOGLE IS YOUR FRIEND!!!
-
In your terminal command, type
npm install live-server -gThis will install a simple, zero-configuration command-line http server.
-
Next you must clone a git repository that contains week one assignment instructions and a basic html shell for your first html/css project. There are three branches in the repo you will clone. The
alphabranch will contain your assignment, with instructions in place of code. Thebetawill contain the completed code and serve as your answer key. While completing the alpha branch, simply refer tobetafor help. -
Remember your Terminal Commands!
Move to the directory you would like to clone your repo using cd (change directory)
Clone your repo with what ever name you like typing git clone followed by the link and then the new name of your repo
git clone https://github.com/t1cgAcademy/Web-Dev-101-Week-2-Assignment.git whateverNameYouWantHereOr you can simply clone the repo and get the default name
git clone https://github.com/t1cgAcademy/Web-Dev-101-Week-2-Assignment.gitOpen your cloned code in Atom or Visual Studio Code
`atom .` or `code .`If the above opening command does not work, you can manually open using your graphical user interface
- Sanity Check!!! Change a simply html element...
-
Press
command son your keyboard to save the changes. -
Now, go to your terminal command, make sure you are in your cloned git directory.
-
Now run your simple http server by typing
live-server. Note: you must be in the projects directory.- When you run this command, you will see the following line...
Starting up http-server, serving ./ on: http://0.0.0.0:[someport]This line shows the local port where your code will run.
- When you run this command, you will see the following line...
-
Go to your browser and enter the following address with the appropriate port...
http://localhost:[someport]/
Now you should be able to see your your changes.
Congratulations! You have just run your first HTML code. Now, get into alpha, follow the instructional
comments and get coding.