As programming isn’t my forte and I’m logically-handicapped, I’ve been trying to get this code to work for the past 3 days and have hit a proverbial wall. What I’m trying to do is create JS code that will retrieve article blurbs within a certain topic (via class identifiers) and have them automatically display on a separate topic page (e.g. if the article is about a widget, the blurb also shows up on the Widget page). Thank you in advance for any help or suggestions you can provide!
Here’s the code that works as long as you only need to select one item per topic (not the case):
Here’s my revised code using document.querySelectorAll. It’s not working (disappears into a huge black hole). I’ve tried adding a few wrinkles, such as using the Array.from property (var EVArray = Array.from(EV)), but no luck:
Thank you for the reply Daniel. I’ve added an Array.from statement and JSON.stringify, but unfortunately it’s still not working. Probably am just not figuring out how to assign the values in the array to innerHTML, but really not sure.