How can I replace the images we used in our lesson to my own choice of images. I tried uploading my choices of photo using TechSmith capture and grabbed the link but it still won’t work.
This is the code we had on our lesson:
var cardsArray = [
{ ‘name’: ‘CSS’, ‘img’: ‘https://github.com/robgmerrill/img/blob/master/css3-logo.png?raw=true’, },
{ ‘name’: ‘HTML’, ‘img’: ‘https://github.com/robgmerrill/img/blob/master/html5-logo.png?raw=true’, },
and so on …
I tried doing this line of code:
var imgArray = new Array();
imgArray[0] = new Image();
imgArray[0].src = ‘images/img/Splash_image1.jpg’;
So I can use relative file path but It creates another problem of losing the name attribute per picture.
Is there a way I can modify the first code?
I’m stuck with our lesson and can’t move on. I’m confused.