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)

All Comments
Sort by:  Most Recent
2019-05-19 07:37:18

The link is not working. Can you please fix it?

Like
View All 3 Replies
2019-07-19 08:28:03

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.

Like
2019-07-19 09:02:59

Bug hunter…. one of my nicknames.

Like
2021-03-01 21:00:39

🪰🔫

If only we had more power to get nasty bugs fixed.

Like