Hi, thanks for the reply.
I’m not sure what you’re saying here. Are you saying that my links don’t work or that you couldn’t get them to work in your project. Assuming it’s the former, I tested it again. When I push a link, the page opens a new window and the correct url gets put in the address line. But page finishes loading (the reload icon is there) but the page is blank. If I reload, the same thing happens. If I cut and paste that EXACT url out of the blank page into a new window, it loads just fine. For whatever reason, the problem seems to be the window that codepen is creating.
That makes complete sense, thank you. The scroll bar changes the width of the window so everything readjusts. I suppose I could do some math and put everything at a fixed distance from the left instead of centering it - if it bothers me.
This is the code:
$("#name-area").append('<p class = "data ' + online + '"><a id = "fcc-link" href = "https://www.twitch.tv/' + account + '"target = "_blank">' + account + '</a></p>');
The variable account is a string of the user name and the variable online is a string saying either “online” or “offline”.
When executed with the username “freecodecamp” it renders this element in html:
That url works beautifully when I cut and paste it, but fails when I use the hyperlink.
Does anyone know why?
Basically, this is a security “feature” on Twitch’s side. They don’t load for links in iframes. There’s nothing you, I, or the Eldritch powers can do about it.