I'm trying to import a snipped from Calendly.com that goes into the <head> tag. When the JS snipped is imported, Calendly puts a "Calendly" variable on the global, window object.
I want to be able to run the following code on button press, but I'm not sure how to tell the Wix code editor that Calendly is a valid object in the global namespace. Anyone have experience using global variables that are imported via the <head> tag?
and here is all of the embed code:
<!-- Calendly link widget begin -->
<link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet">
<a href="" onclick="Calendly.showPopupWidget('https://calendly.com/talk-hiring/mock-interview');return false;">Schedule time with me</a>
<!-- Calendly link widget end -->