title: How to apply same event to multiple buttons?
body: <p>I am trying to "toggle" information shown after button clicks.  I have multiple buttons that when each on is clicked, I want to either show or hide a block of text.</p>
  
  <p>Unfortunately right now, when I click one button, it shows or hides ALL of the text blocks instead of just one.</p>
  
  <p>This is the first script I have ever written on my own so please excuse me if I am using the incorrect syntax, but this is what I could figure out was necessary to use instead of toggle (as it is deprecated).</p>
  
  <p>Here is my script:</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="headCustomScriptsCSS" runat="server"&gt;
      &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          $(document).ready(function (e) {
              $('button').click(function () {
                  if ($(this).hasClass("clicked")) {
                      $('p').show();
                      $(this).removeClass("clicked");
                  } else {
                      $('p').hide();
                      $(this).addClass("clicked");
                  }
              });
          });
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Some of my HTML code:</p>
  
  <pre><code>&lt;asp:Content ID="Content3" ContentPlaceHolderID="cpMainContent" runat="server"&gt;
      &lt;h1&gt;
          Add a New Application&lt;/h1&gt;
      &lt;h3&gt;
          General Description&lt;/h3&gt;
      &lt;div&gt;
          &lt;div class="column-left"&gt;
              &lt;label for="EnglishShortName"&gt;
                  English Short Name&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="column-center"&gt;
              &lt;input type="text" name="EnglishShortName" /&gt;
          &lt;/div&gt;
          &lt;div class="column-right"&gt;
              &lt;button type="button" class="myButton"&gt;
                  ?&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="help"&gt;
              &lt;p&gt;
                  This is the paragraph to end all paragraphs. You should feel lucky to have seen such a paragraph in your life. Congratulations! &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;div class="column-left"&gt;
              &lt;label for="FrenchShortName"&gt;
                      French Short Name&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="column-center"&gt;
              &lt;input type="text" name="FrenchShortName" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;div class="column-left"&gt;
              &lt;label for="ApplicationCode"&gt;
                  Application Code&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="column-center"&gt;
              &lt;input type="text" name="ApplicationCode" /&gt;&lt;br /&gt;
          &lt;/div&gt;
          &lt;div class="column-right"&gt;
              &lt;button type="button" class="myButton"&gt;
                  ?&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="help"&gt;
              &lt;p&gt;
                  This is a paragraph much like the last one.  It is a paragraph to end all paragraphs. You should feel lucky to have seen such a paragraph in your life. Congratulations! &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  ...
  </code></pre>
  
  <p>and some of my CSS:</p>
  
  <pre><code>.column-left
  {
      text-align: right;
      float: left;
      width: 30%;
      padding-top: 10px;
      padding-bottom: 10px;
      padding-right: 5px;
  }
  .column-right
  {
      float: right;
      width: 20%;
  }
  .column-center
  {
      display: inline-block;
      width: 46%;
      padding-top: 10px;
      padding-bottom: 10px;
  }
  .help
  {
      width: 50%;
      margin-left:25%;
      border:1px dotted black;
      text-align:justify;
  }
  </code></pre>
  
  <p>I have multiple more buttons like this that show and hide text.  My question is, how do I get the event to be handled separately for each button?  Do I need to have multiple scripts written?</p>
  
  <p>Thanks in advance!</p>