Copy link to clipboard
Copied
Hi, our company is creating a course shell using Captivate 9. We need to be able to embed jquery into the project template so that a student can deploy a training environment for hands-on practice exercises. Our LMS programmer has created javascript code to interface between the LMS API and the training environment API. We also need this to be an easy enough solution so that non-programmers who will create new course shells using this template do not have to deal with adding code to the published .htm file. Any ideas, suggestions?
Copy link to clipboard
Copied
In Captivate project, on the first slide, go to Actions > On Enter > Execute JavaScript
You can use any of these two scripts:
1.
var scriptLink = '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>'
$(scriptLink).appendTo("head")
2.
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(script);
/best
Copy link to clipboard
Copied
Hi Kris,
Were you able to implement this solution? Let me know if there are any challenges. Using this solution you will be able to initite/embed jQuery in the start of the course and then write jQuery based scripts throughout the course for all slides and objects.
/best
Copy link to clipboard
Copied
jQuery is already linked to a published Captivate project a long as it is HTML5. You don't have to do anything.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more