Copy link to clipboard
Copied
I've been trying to use javascript to create both shift-click and ctrl-click buttons (separate buttons) but they don't seem to work. Any suggestions:
Here is the code for the shift-click button:
$(document).click(
function(e){
if(e.shiftKey){
document.Captivate.cpEISetValue('m_VarHandle.cpCmndNextSlide');
}
}
);
Copy link to clipboard
Copied
Are you using CP7 and swf, html or both?
Your syntax is a little off
$(document).click(function( e )
{
if (e.shiftKey)
{
document.Captivate.cpEISetValue('m_VarHandle.cpCmndNextSlide');
}
});
Also since you are using jQuery, you will need to load it for swf and for HTML5 you need to put the script after jQuery is loaded.
Copy link to clipboard
Copied
I'm using CP8 and I wanted to use javascript instead of creating a swf button so I can also use the button for html 5. So both SWF and HTML5.
Copy link to clipboard
Copied
I think even if you get the script loaded at the right time, you are going to run into issues with Captivate blocking the click for HTML5 unless you click outside of the presentation.
Copy link to clipboard
Copied
I might have to stick to SWF buttons then.