-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4410ff
commit 12d6ca5
Showing
7 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+402 KB
...rkeley_UniversityOfCaliforniaAtBerkeley_byCharlieNguyen-Flickr_2008_001_Sig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// let a = 100; | ||
// var --> whole fxn, let --> within current block, const --> let but no change | ||
|
||
// for (let a in [1.1, 4, true, null]) { | ||
// console.log(a) | ||
// } | ||
|
||
// === tests if value is equal plus type while == can coerce types so true==1 but true!==1 | ||
// loops+iterations | ||
|
||
// function name(args) { stuff r} | ||
|
||
// objects --> { stuff: this { things}, "more stuff": this {} } | ||
// person.name gets name same as person["name"] | ||
// the formatting above is basically json pandas can read json etc | ||
|
||
// DOM --> tree data structure with html elements | ||
// querySelector(___) looks for css selector like .red-square from class or #__ for id | ||
// takes first matching item | ||
// can also get by class, id, tag names then add an index for which like getbytag("P")[1] | ||
// for 2nd p tag thing | ||
// input tag in html makes a thing to type into then can give event listener w/fxn | ||
// keyup = global vs (element).onclick .onchange etc specific to some input/html element | ||
// also specific to element if .addEvListener on that element same as onclick=Fxn in html | ||
|
||
let mlInterest = document.getElementById("mlinterest") | ||
|
||
mlInterest.addEventListener("click", function() { | ||
let image = document.createElement("img") | ||
image.src = "/Users/deepshikhakaul/Documents/GitHub/divijmuthu.github.io/mlimage.png" | ||
image.width = 200 | ||
image.height = 150 | ||
mlInterest.appendChild(image) | ||
let interests = document.getElementsByClassName("interestspage") | ||
interests.height += 150 | ||
}) | ||
|
||
let educAnim = document.getElementById("education-anim-button") | ||
let educPics = ["/Users/deepshikhakaul/Documents/GitHub/divijmuthu.github.io/7DF5041B-51B9-42FA-9D6C-1F8866C40D2E_1_201_a-900x674.jpeg", | ||
"/Users/deepshikhakaul/Documents/GitHub/divijmuthu.github.io/CA_Berkeley_UniversityOfCaliforniaAtBerkeley_byCharlieNguyen-Flickr_2008_001_Sig.jpg" | ||
] | ||
let educInfo = ["Dublin High School", "UC Berkeley"] | ||
let count = 0 | ||
|
||
educAnim.addEventListener("click", function() { | ||
if (count < educPics.length) { | ||
let info = document.createElement("p") | ||
info.textContent = educInfo[count] | ||
info.style = "font-size: 20px"; | ||
educAnim.appendChild(info) | ||
let image = document.createElement("img") | ||
image.src = educPics[count] | ||
image.width = 600 | ||
image.height = 400 | ||
educAnim.appendChild(image) | ||
count++ | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters