cp.hide("myObject); works but I then cannot show it with cp.show("myObject") as recommended in the documentation.
It looks like once hidden it is gone! If I enter document.getElementById("myObject"); in the browser console null is returned. I have seen a similar post on StackOverflow that was not resolved.
I have tried the same with an object added to a slide rather than master slide and get the same behaviour.
What I am trying to do is create custom navigation buttons in a responsive project using fluid boxes to overcome the serious limitations of the built-in Captivate playbar. It is proving to be far from straightforward. I hope someone can help!
Just pop in to tell you that I never need JS to create custom navigation and toggle buttons. But will leave you to the JS experts, know that it is 'dangerous' to offer easier ways. 🙂
Are you changing slides?
Unless you set the navigation buttons to show for the rest of the project, each object will have a new ID on each new slide and so you'll hide and show the same button however many slides ago if you use the same code. So either modify your onEnter code to reflect the new ID for each page or show the buttons for the rest of the project so that the same ID can be used.
I will be honest and say that I don't work with responsive projects so I am unsure about any idiosyncrasies that might interfere with what you're trying to do or not.
Thank you both for your help.
I tried "Rest of slide" for buttons but this falls apart with responsive projects and fluid boxes.
Until such time as a slider is available for the slide timeline like that for event videos (or I can work out how to implement one that will work placed on a master slide in a responsive project with fluid boxes) this will do.