Javascript not working?

Posted in: Newspaper
Post count: 15

Hi

I’m trying to add a popup donation box using code from DonorBox. I’ve added it to other WordPress sites without an issue but can’t get it to work on my Newspaper theme site.

I have a class added to my donation button (I can see the class is being added by inspecting the element). And then I’m pasting the JS into Theme Panel > Google Analytics and JavaScript Codes > Header Script Code.

When I click on the donation button I am taken to the donation page on the DonorBox website instead of a popup donation box appearing on my website, like it’s suppose to.

Am I pasting the JS in the correct place? Any other suggestions to get it to work?

Here’s the link to the website. The donation button is in the header – right side:
https://larryr1.sg-host.com/

Post count: 21065

Hello!

Try to place it in Theme Panel -> Google Analytics and JavaScript Codes -> Footer Script Code.

Let me know the results!

Thank you!

Post count: 15

Hi. That didn’t work. I also tried pasting into the “AFTER BODY SCRIPT CODE” area but that didn’t work either.

Post count: 21065

Hello!

In Composer, there is an element called “RAW HTML”. Please try to use it with the js code.

Thank you!

Post count: 15

That didn’t work. But I did a little experimentation: I added a Column Text element and created a text link with the same class and link. That works – even when the JavaScript is pasted into the Theme Panel > Google Analytics and JavaScript Codes > Header Script Code area. It just won’t work with the Button element for some reason. Any other suggestions?

Post count: 15

I ended up just replacing the button element with an Column Text element and styling it to look like a button. thanks

  • This reply was modified 4 years by duane.
Post count: 27744

Hello,

I’m glad you found a solution for what you wanted to achieve.

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.