




Hey all,
I presented this at the 2018 Adobe Conference and thought I would share it here.
I used jQuery UI to add a slider to a course. When learners operate the slider it updates a Captivate variable.
You can view it here: https://gforce.courseportfolios.com/
And here is the code I used:
$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css')); $.getScript("//code.jquery.com/ui/1.12.1/jquery-ui.js");
setTimeout(function() {
varhandStates= [“Normal”, “one”, “two”, “three”, “four”]
varcustomSlider=$(“#sliderArea”).append(“<div id=’customSlider’style=’z-index: 1000;’></div>”);
$(“#customSlider”).slider({
min:0,
max:4,
range:”min”,
value:0,
slide:function(event, ui) {
window.cpAPIInterface.setVariableValue(“sliderValue”, ui.value)
cp.changeState(“hand”, handStates[ui.value]);
}
});
}, 500)



.png)
The link is not working. Can you please fix it?
Thanks Lieve! CoursePortfolio is still in beta and you found a bug!
I fixed the URL above and will have the team fix the bug soon.
Bug hunter…. one of my nicknames.
🪰🔫
If only we had more power to get nasty bugs fixed.