

So, for example, if you named your cross “cr1”, instead of “cross_1” you put “cr1”. Exchange the elements that I put in bold (cross_1). This is the place where you paste the code.Ĥ. Go to “properties’ tab -> actions-> on enter, and from the drop-down menu choose “execute javascript”. Var h = document.getElementById(“ cross_1c”)ģ. You don’t have to worry about that.ĭocument.getElementById(“ cross_1“).addEventListener(“mouseover”, MF222) When the user hovers over the cross it will turn around.ġ. So we want to create a cross which we want to use, let’s say, as a button to hide an element in our project. The rest is done by the Captivate’s advanced action. You can use it “as it is”.įirst, you can play with my demo to see what kind of effect I’m talking about. Those of you who know some javascript will know how to modify this chunk of code. But this code snippet is simple and innocent. In most cases copying javascript code without understanding it is not the best idea, because of safety and functionality. The intention is to show this functionality to all of those who don’t want to learn javascript but want to try how it works and maybe just use it in their project. In this blog, I’m going to give you the snippet of javascript code which you will just copy, paste, and, voilà, it’s ready to use.
