Last active
February 14, 2020 07:49
-
-
Save rutikwankhade/c265841baff925775c174dbfe06318d6 to your computer and use it in GitHub Desktop.
hey guys I need some help
This file contains hidden or 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
I have div element in html file | |
<div id="team"> | |
</div> | |
and the script file has following contents | |
let divElement=document.getElementById('#team'); | |
const teammates = [ | |
{ name: 'Ashish Karhade', | |
img:'images/team/profile - Ashi.webp', | |
linkedin:'https://www.linkedin.com/in/ashiishkarhade', | |
twitter:'https://twitter.com/ashiishkarhade', | |
github:'https://github.com/ashiishkarhade' | |
}, | |
{ name: 'Ashish Karhade', | |
img:'images/team/profile - Ashi.webp', | |
linkedin:'https://www.linkedin.com/in/ashiishkarhade', | |
twitter:'https://twitter.com/ashiishkarhade', | |
github:'https://github.com/ashiishkarhade' | |
}, | |
{ name: 'Ashish Karhade', | |
img:'images/team/profile - Ashi.webp', | |
linkedin:'https://www.linkedin.com/in/ashiishkarhade', | |
twitter:'https://twitter.com/ashiishkarhade', | |
github:'https://github.com/ashiishkarhade' | |
} | |
]; | |
let markup = ` | |
<div class="member"> | |
${teammates.map(mate => ` | |
<img class="member-img" src="${mate.img}"> | |
<span>${mate.name}</span> | |
<div class="allicons"> | |
<a href="${mate.linkedin}"><img class="icons" src="icons/linkedin.png"></a> | |
<a href="${mate.twitter}"><img class="icons" src="icons/twitter.png"></a> | |
<a href="${mate.github}"><img class="icons" src="icons/github-image.png"></a> | |
</div> | |
</div> | |
`)} | |
</ul> | |
`; | |
divElement.innerHTML= markup; | |
but its saying | |
script.js:69 Uncaught TypeError: Cannot set property 'innerHTML' of null | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment