title: How to have 2 elements share an event in jQuery, and refer to that particular element
body: <p>I have a simple question.</p>
  
  <p>Is it possible to rewrite this code below since they both do the same thing, except modify a particular element?</p>
  
  <pre><code>$(document).ready(function(){
    $("#clickShow").click(function(){
      $("#cw1").toggleClass("showLess");
      if($("#clickShow").text() === "Show more"){
        $("#clickShow").text("Show less");
      } else {
        $("#clickShow").text("Show more");
      }
    });
  
    $("#clickShow1").click(function(){
      $("#cw2").toggleClass("showLess");
      if($("#clickShow1").text() === "Show more"){
        $("#clickShow1").text("Show less");
      } else {
        $("#clickShow1").text("Show more");
      }
    });
  });
  </code></pre>
  
  <p>Thanks</p>