Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p>Open the details.</p> <details ontoggle="myFunction()"> <summary>Copyright 1999-2014.</summary> <p> - by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </details> <p><b>Note:</b> The details element and the ontoggle event is currently only supported in Chrome, Safari 6+, and Opera 15+.</p> <script> function myFunction() { alert("The ontoggle event occured"); } </script> </body> </html>
Result: