brooklyndesignstudio

Button Toggle Between Classes

Nov 28th, 2020
726
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <button onclick="myFunction()">TEXT OFF</button>
  2. <div id="tavid-vid-conte"></div>
  3.  
  4. <script>
  5. function myFunction() {
  6.  var element = document.getElementById("tavid-vid-conte");
  7.  element.classList.toggle("mystyle");
  8. }
  9. </script>
  10.  
  11. <style>
  12. .mystyle {
  13. display: none !important;
  14. }
  15. </style>
RAW Paste Data