ontoggle Event in JavaScript
ontoggle Event in JavaScript
The ontoggle event is used to trigger when the user opens or closes a details element. The details element actually specifies additional details for the user so that she/he can view or hide that information.
Syntax:-
Its syntax is:- < element ontoggle="my_script" > OR object.ontoggle= function(){my_script} OR object.addEventListener("toggle", my_script)