title: Changing text on click
body: <p>How could I go about changing the word 'expand' to 'collapse' with multiple headings with a click function?</p>
  
  <pre><code>&lt;h2 class="expand" id="content-1" style="cursor:pointer;" value="One"&gt;Click to expand One&lt;/h2&gt;
  &lt;h2 class="expand" id="content-2" style="cursor:pointer;" value="Two"&gt;Click to expand Two&lt;/h2&gt;
  </code></pre>
  
  <p>Just not sure how to go about it.</p>
  
  <pre><code> $('.expand').on('click', function() {
       $('#').show();
        $(this).children().text('Click here to collapse ' + value);
      }, function () {
        $('#').hide();
        $(this).children().text('Click here to expand ' + value);
      });
  });​
  </code></pre>