Can’t get Javascript API to work
-
Like many users here, I’m trying to set up an automatic popup. Using the “Scripts n Styles” plugin, I’m dropping Javascript code into the header of the page I want the popup to appear on. Here’s my Javascript:
function myFunction() {
alert(“myFunction has fired”);
DiviPopup.openPopup(‘myPopup’);
}
setTimeout(myFunction, 3000);I get the “myFunction has fired” alert (so I know the the Javascript is executing), but no popup.
There’s a button on the page labeled “Show popup” which successfully shows the popup, so I know the Popups for Divi plugin is working (so tantalizing! if only I could get it to work off javascript). Any idea how to get the API call to work? I’ve tried using window.openPopup(‘myPopup’); but that doesn’t do anything either.
The page I need help with: [log in to see the link]
- The topic ‘Can’t get Javascript API to work’ is closed to new replies.