Devlog 3 - Ok, so all that time writing out the CSS classes may have been pointless…. After trying a lot of different stuff, I found that the only way I could get the image to show was by turning the original div into an img element and changing the src to match different files in Javascript. Oh well, live and learn and all that. I’m back in buisness with the old copy paste for now, though, as I use a switch() function to check the variable that stores the random number and the case/break parts are all very similar (save the src, caption and, you know, the number it checks for). I’m feeling fairly confident that this will work out, though. After I finish this part, I’ll add a button to change the picture and caption so you don’t have to reload the page every time.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.