+ 3

How do I create buttons that make whatever is currently on a screen disappear and something new display?

For two of my projects I need 3 buttons to make text come up on a screen and disappear when another is pressed to display new information. I don't have a code to present because I have no clue how to add that to my page. can someone give me a clue as to how that is done.

21st Mar 2018, 8:16 PM
Babydoll Scripts
Babydoll Scripts - avatar
4 Respuestas
+ 3
@Julien Will this work if I want 3 buttons that make previous text disappear when another one us clicked?
21st Mar 2018, 10:02 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
21st Mar 2018, 8:35 PM
TrueJu
TrueJu - avatar
+ 1
so you wanna have a button to switch the display of an element? you can use jquery for that just create a button with onclick="yourfunc()" and in js you write this: function yourfunc() { $("#theelement").toggleClass("invisible"); and in css you create a class with .invisible { display:none;) ill upload a sample code for you
21st Mar 2018, 8:29 PM
TrueJu
TrueJu - avatar
+ 1
you can change the code example from me so it does
22nd Mar 2018, 12:13 PM
TrueJu
TrueJu - avatar