Captivate offers hiding objects as one of the very basic functionalities. Unfortunately, when you use it, the effect is rather abrupt. Sure, you can attach an animation to it, but it is then a combined action, requiring some more effort. How about entering just one line of code that will hide or show an object with a nice fade-in or fade-out transition?
Sounds tempting? So read on!
Wait! What’s jQuery?
So that’s jQuery in a nutshell, for those who are curious. But don’t worry, this blog is not about theory, it’s not about programming, it’s about Captivate. Don’t disconnect
Now, the code. TA-DAAA…
Important!!! Copy the code from this file (not from the description): code
Below I will describe how to use it.
Now, you have to insert your object’s name (Id) in the right place. Look below:
My object’s name is “carBlue1”. What you have to do is to replace “carBlue1” with your object’s name. Let’s say your object’s name is “red_flower”. In this case, your code would be:
Notice that you must leave inverted comas, #, and letter c in their original positions!
And what is “900” in the brackets at the end? You can manipulate how long the fade-in and fade-out will last. It’s MILLISCECONDS not seconds. So you can make it very precise. In my case, it’s a little bit less than one second. You can make it, say, 1,5 seconds, then the code would look like this:
To sum up, don’t change anything but the name (remember to leave inverted commas, #, and “c” where they are) and the number (milliseconds).
When everything is ready, press OK to close the window. You can always return to the code and edit it if needed.
I hope you will find it useful. Happy captivating!