Skip to main content
jennys13268985
Participating Frequently
Sep 12, 2018 2:28 PM UTC
Question

Rollover triggering an action

Hello,

I'm new to Captivate.

I'd like to create a button who will trigger an action when I rollover it... not when I click on it.

Is it possible with Captivate?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Jeremy Shimmerman
Participating Frequently
Sep 12, 2018 6:14 PM UTC

Here's how you can do this using JS.  

1. Give the object the id hover

2. On enter frame execute the following javascript:

var obj = document.querySelectorAll("[id^='hover']")[1];

obj.addEventListener("mouseenter", function(e) {

//Add your action here. 

cp.alert('Object has been hovered over')

});

As Lilybiri has said, you probably want to have a click action as well for mobile devices.  

 

Translate
Lilybiri
Legend
Sep 12, 2018 2:31 PM UTC

Out of the box, Captivate has only one 'hover' event which could trigger an action. That is for the Rollover Slidelet. It is possible to create events with either the HTML widget by InfoSemantics or with JS.

However, hope you are aware of the fact the Rollovers will NOT work on any mobile device, only when a mouse is used which means a laptop or a desktop? Is it a good idea to use that event?

Translate