title: I have four menu buttons, but only one pop-up window through jQuery, can I generalize or do I need four different windows?
body: <p>I picked up HTML/CSS/Js a few days ago and I made my first very own website. I have this code that is a pop-up:</p>
  
  <pre><code>&lt;div class="popupwindow"&gt;
      &lt;div class="popupbody"&gt;
          &lt;button class="closebtn"&gt;X&lt;/button&gt;
          &lt;h3&gt;Title&lt;/h3&gt;
          &lt;p&gt;Text&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I have a menu with four buttons. The buttons look like so:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="menuone"&gt;&lt;a href="#"&gt;button one&lt;/a&gt;&lt;/li&gt;
      &lt;li class="menutwo"&gt;&lt;a href="#"&gt;button two&lt;/a&lt;/li&gt;
      &lt;li class="menuthree"&gt;&lt;a href="#"&gt;button three&lt;/a&gt;&lt;/li&gt;
      &lt;li class="menufour"&gt;&lt;a href="#"&gt;button four&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Right now my jQuery code only triggers when the button with the tag "menuone" is pressed.</p>
  
  <p>My question is, can I use the same jQuery code somehow and generalize this?</p>