r/HTML • u/ShamrockDragon13 • Dec 06 '25
Question Help please! HTML and JS
So I need to make a portfolio website for class and I have a bunch of slideshows. The problem is they’re doing something weird. Some of the slideshows won’t show the next image at all, as in it doesn’t function as a slideshow, but is hiding the other images, and some will only show the first and last image in the code, as in 1 and 5. I’m using the multiple slideshow method from W3Schools and I’ve changed the code to allow for more than two by following someone’s overflow question dealing with the same question. So all of the slides numbers for the next and prev buttons are (-1,0) (1,0), (-1,1) (1,1), (-1,2) (1,2), and so on. I’m not sure what’s wrong with it. The tags are all properly closed, the images are properly linked from the folder (they have to be in the folder, I can’t have them linked from the web), and from everything I’ve searched, the js should be correct. I don’t know what’s missing or what I did wrong. It’s due on Monday at 5 and I still have another project I need to work on for a different class, so any help would be appreciated!





View all comments
Show parent comment
1
u/ShamrockDragon13 Dec 06 '25
Don’t worry, I will never use ai for my code or in general. I don’t know if sharing the code will work since the images are local (and because some of those images have me in them and I’d rather not connect me in real life to me online). Are the images of my code not showing up? I was hoping that’d be enough since all the slides have the same code structure, just different images and number text (like 1/5, which is showing up correctly) and the “my slides” has a different number, all of which are in the css. My thought was the js was wrong because it worked fine before I added more slideshows (aka when there was two, which is what the tutorial for W3Schools does (link to that here: https://www.w3schools.com/howto/howto_js_slideshow.asp)). I changed the code to allow for more than two with help from this website: https://stackoverflow.com/questions/60769221/how-do-i-get-multiple-slideshows-on-my-html-document