0

Which tag is used in html in place of toggle() used in JS?

As in JQuery or JS we use toggle() for text hiding, what do we use in html instead? This function I am talking about which are used in these codes: https://code.sololearn.com/W9NAjgsZiV5o/?ref=app https://code.sololearn.com/WI75H2Lc4psR/?ref=app

4th Aug 2020, 11:57 AM
Rahul Kumar
Rahul Kumar - avatar
2 ответов
0
you have to add an atribute and value this way: style=“visibility:hidden” remeber HTML is mostly used to design the architecture of a web page, you have to use CSS for styling it
5th Aug 2020, 2:08 PM
Tomás Atrat
0
Probably jQuery toggle() does what classList.toggle() method do. https://www.w3schools.com/jsref/prop_element_classlist.asp
5th Aug 2020, 3:25 PM
Ipang