diff --git a/Ideas.md b/Ideas.md index 11a6a0d..ae7654e 100644 --- a/Ideas.md +++ b/Ideas.md @@ -6,8 +6,14 @@ Project * Rock Paper Scissors Curricula +* We might need to quickly go over and review the CSS material.. if we have time * variables * functions * jQuery's selector class * jQuery click events * styling elements with jQuery + +Style of Teaching +* Show and run the game for them first +* We should be coding with them to be more interactive - making them follow the slides would be too dull +* We could use one screen for the code and the other for the HTML page that would be displayed so they could see them side by side diff --git a/intro-to-javascript.md b/intro-to-javascript.md new file mode 100644 index 0000000..44dfc7e --- /dev/null +++ b/intro-to-javascript.md @@ -0,0 +1,124 @@ +# Variables + +* We will provide an HTML file: +```html + + + + + Javascript Tutorial + + + + + +``` +* We will add an `onlclick` event to the button and add the function between script tags in the body: +```html + + + + + Javascript Tutorial + + + + + + + +``` +* Then, we'll take it up a notch and introduce arguments. +```html + + + + + Javascript Tutorial + + + + + + + +``` +* But what if we want to ask them what their name is? We can add a prompt. +```html + + + + + Javascript Tutorial + + + + + + + +``` +* Since pressing Cancel results in the alert saying "Hello, null!" we can include an if statement: +```html + + + + + Javascript Tutorial + + + + + + + +``` +* Addition of the confirm() option: +```html + + + + + Javascript Tutorial + + + + + + + +```