+ 1

Hide/Show

I want a code that if I press a button it will hide the paragraph but when I press the button again it will show the paragraph. Basically; If button pressed =hide If elm=hide Then elm=show I don’t know? Something like that.

14th Jul 2018, 3:43 PM
Ryan Sullivan
Ryan Sullivan - avatar
4 Réponses
+ 9
You can use the toggle method, here is an example: https://www.w3schools.com/jQuery/eff_toggle.asp
14th Jul 2018, 4:01 PM
NezhnyjVampir
+ 1
https://code.sololearn.com/WBlplxDV4X4u/?ref=app
14th Jul 2018, 3:58 PM
Nayem
+ 1
Hi Ryan Sullivan, You should go ahead and finish the jQuery tutorial here. It totally covers this: https://www.sololearn.com/learn/jQuery/2815/?ref=app
14th Jul 2018, 10:21 PM
Janning⭐
Janning⭐ - avatar
0
You can try this javascript code
14th Jul 2018, 3:59 PM
Nayem