Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
1. **Fork** this repository
2. **Clone** this repository from your personal Github account:
- Copy the HTTPS or SSH address on the page.
- From you DevLeague folder, run the command `$ git clone [SSH or HTTP address]` in your terminal in order to clone this repository into that folder
- From you DevLeague folder, run the command `$ git clone [SSH or HTTP address]` in your terminal in order to clone this repository into that folder
(you don't need to type the "$"; this is the command __prompt__, and is used to signify your terminal is ready for commands).
3. From your terminal, navigate into the js-DOM assignment:
- `$ cd js-DOM`
4. Open the js-DOM assignment in sublime and write your code in the `app.js` file.
5. Run live-server to see your results in the browser


Optional
For macs - `cmd + opt + 2` to open 2 columns in your text editor
For win - `ctrl + shift + 2` to open 2 columns in your text editor
29 changes: 27 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Find the div with the id of "name1" and replace the n/a with the following:

Tay-Tay*/

var taylorSwift = document.getElementById('name1');
taylorSwift.innerHTML = 'Tay-Tay';

/*2. DJ Khaled

Find the div with the id of "position2" and replace the n/a with the following:
Find the div with the id of "position2" and replace the n/a with the following:

Project Manager*/

Expand All @@ -27,6 +29,9 @@ Concatenation*/

Find the div with the class name of "profile" and replace the n/a with a verse from your favorite Prince song.*/

var princeMe = document.getElementsByClassName('profile');
console.log(princeMe);
princeMe[0].innerHTML = 'Diamonds and pearls'


/*5. Bruce Lee
Expand All @@ -47,8 +52,13 @@ Create a div element and give it an id of "name7". Inside this div element, give

Append this div element to the nameParent div*/

var familyGuy = document.createElement('div');
familyGuy.id = 'name7';
familyGuy.innerHTML = 'Peter Griffin';
var parentDiv = document.getElementById('nameParent');
parentDiv.appendChild(familyGuy);



/*8. Tim Duncan

Create a div element give it an id of "alias8". Inside this div element, give it the contents of "Old Man Riverwalk".
Expand All @@ -60,3 +70,18 @@ Append this div element to the aliasParent div.*/
//Final Boss
/*9. Create your own profile.*/

/*var name = document.createElement('div');
name.id = 'name9';
name.innerHTML = 'Long Duck Dong';
block3[2].appendChild(name);*/
var startDiv = document.getElementsByClassName('block3 col-sm-4');
console.log(startDiv);

var myPic = document.getElementsByTagName('img');
console.log(myPic);
myPic[8].src = "http://www.dailyactor.com/wp-content/uploads/2014/05/Long+Duk+Dong-Gedde+Watanabe-audition.jpg";

var nameDiv = document.createElement('div');
nameDiv.innerHTML = 'Long Duk Dong';
nameDiv.id = 'name9';
startDiv[2].appendChild(nameDiv);