Using CSS and JavaScript on a post
-
Dears
I am an older WP-user, trying to program a visual effect on a new post. I am impressed by the way chatGPT displays its text after an enquiry. I asked for the code and got this as an answer:Here’s an example of how we can use JavaScript and CSS to create a moving ChatGPT response: Then the three code snippets… which cannot be copied into this text.
In this example, we first create a………….
with a class of chatgpt-response and a tag inside of it. We style the
and tags with CSS to make the text move across the screen. We then use JavaScript to set up an interval that changes the text in the
tag every 5 seconds. The text is taken from an array of responses, and we cycle through the array using the modulus operator to loop back to the beginning once we reach the end.After installing WPCode I created three snippets but did not succeed to put everything in order. The new post shows a running text above the site header, even though I tried several combinations of placing the snippets.
I would appreciate someone to help me on this. Thank you!
Werner
The page I need help with: [log in to see the link]
The topic ‘Using CSS and JavaScript on a post’ is closed to new replies.