Tippy js is not getting added to window object

77 Views Asked by At

i add this script to codepen and in wix website, in codepen it's working but not in wix website

in the script code i add this code to add tippy.js in the website

var script = document.createElement('script');
script.onload = function () {
  console.log("popperjs load!!");
  console.log(window);

  var script2 = document.createElement('script');
  script2.onload = function () {
    console.log("tippy.js load!!");
    console.log(window);


    tippy("#aulingo-call-widget", {
      content: "My tooltips!"
    });
  };
  script2.src = 'https://unpkg.com/tippy.js@6';
  document.body.appendChild(script2);
};
script.src = 'https://unpkg.com/@popperjs/core@2';
document.body.appendChild(script);

it's working in codepen and added the tippy in window object enter image description here enter image description here

but in wix website, the tippy is window object not being added enter image description here enter image description here

codepen https://codepen.io/rupakbarman/pen/JjepRoJ

wix website https://www.dev-site-5x6816.wixdev-sites.org/

see both using same script but in wix website i am getting error in console saying tippy is not defined

0

There are 0 best solutions below