Forum Discussion

AndrewMaranta-c's avatar
AndrewMaranta-c
Community Member
5 years ago

Fix for loss of jQuery and GSAP in new update

Hey all,

If you used to use jQuery and GSAP, it has been removed in the latest update. I've found a work around for anyone that wants to keep using it. 

Simply add this code into your slide when timeline starts:

 

function dynamicallyLoadScript(url) {

var script = document.createElement("script");

script.src = url;

document.head.appendChild(script);
}

dynamicallyLoadScript("https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js");

dynamicallyLoadScript("https://cdnjs.cloudflare.com/ajax/libs/gsap/3.1.1/gsap.min.js");

 

To target elements on the page which you used to do with:

var obj = $('[aria-label= "obj"] svg');

You now can use:

var obj = $('[data-acc-text = "obj"] svg');

 

Cheers,

Andrew