Jump to content

Studio D

Members
  • Posts

    1
  • Joined

  • Last visited

Studio D's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. We're working with wordpress and the Laytheme Plugin and we're complete html beginners. But so far it went pretty well, we have a menu which is a accordion and a "About" text on top. Now we want to have a button over which you can use to hide both of them. So it was only possible to hide the accordion menu but not the text on top. (see screenshot) For now it starts like that: <div><span class="oben"> <input class="my-button" type="button" value="" onclick="myFunction()"> <div id="mycompany"> <p class="about"> <a href="https://www.instagram.com" class="link">Link</a> is...text <a href="mailto:?Subject=Hello%20Diadem" target="_top" class="link">mail</a> </p> <hr class="line2"> <hr.line2> <button class="accordion"> <a class="js-scrollTo" href="#title"> <table> <tr> <td style="width:120px">TITLE</td> <td style="width:120px">EDITORIAL DESIGN</td> <td style="width:120px">320 PAGES</td> </tr> </table> </a> </button> <div class="panel"> ...more content </div> And the script is: <script> function myFunction() { var x = document.getElementById("mycompany"); if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } } </script> As you can see it's difficult for us to explain, we hope it's possible to understand and to help us out. We're getting desperate!
×
×
  • Create New...