Using a button to hide/show named...

User 405851 Photo


Registered User
2 posts

Hi ... I am learning heaps but this ones got me a bit stumped. I am using RSD and WOWslider to build a gallery page. I've got a gallery imported and working fine. What I'd like to do is put a row of buttons or List items that show the gallery that button is linked to, while hiding the others.

Playing around with some code I found online I found I could add an html element and run this ...

<button onclick="text1.style.display = 'none';text2.style.display = 'none';barrier.style.display = 'block';">Click here to toggle visibility of div element #idnamehere </button>

It put a green button in the HTML container (I'm assuming the green came from a default in the CSS,) and sure enough on clicking items ID text1 and text2 disappeared and elementid "barrier" appeared. (barrier was just a glyphicon).

But I cant control the button appearance without modifying the CSS I presume?

The Submit Button element allows me to modify its appearance, but I cant see any way to add functionality to the button, such as the code above.

Am I missing something obvious?

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.