Skip to content

Commit

Permalink
Task 4 completed
Browse files Browse the repository at this point in the history
  • Loading branch information
novinary committed Jan 28, 2019
1 parent 75c56b8 commit 4a8f0d4
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,23 @@ mainNavItems[5].textContent = siteContent["nav"]["nav-item-6"];

// querySelect nav
let newNavItem = document.querySelector("nav");

// anchor tag
let newAnchorTag = document.createElement("a")
// new anchor tag
let newAnchorTag = document.createElement("a");
//name it
newAnchorTag.textContent = "More info on DOM";
//change color
newAnchorTag.style.color = 'green';
//append the new anchor tag to the end
newNavItem.appendChild(newAnchorTag);

// new anchor tag
let newAnchorTag2 = document.createElement("a")
// name it
newAnchorTag2.textContent = 'Subscribe here!'
// prepend the new anchor tag to the beginning
newNavItem.prepend(newAnchorTag2);
// change color
newAnchorTag2.style.color = 'green';

/* CTA */
//h1 selector
Expand All @@ -85,6 +99,7 @@ ctaH4[2].textContent = siteContent["main-content"]["services-h4"];
ctaH4[3].textContent = siteContent["main-content"]["product-h4"];
ctaH4[4].textContent = siteContent["main-content"]["vision-h4"];


//paragraph selectors
const para = document.querySelectorAll('p')
para[0].textContent = siteContent["main-content"]["features-content"];
Expand Down

0 comments on commit 4a8f0d4

Please sign in to comment.