title: How to get the content inside the link that is clicked jQuery
body: <p>So I have a couple of links that run the same function when they are clicked. But I need the text they contain as a variable in jQuery.</p>
  
  <p><code>var myVariable = content inside link</code></p>
  
  <p>I'm actually using this function that the link activates</p>
  
  <pre><code>function updateStatus() {
      var link_text = linktext_here;
  
      jQuery.post("/to/my/php/file/mylist.php", {firstParam : link_text}, function(data) {
          //this is your response data from serv
          console.log(data);
  
      });
      return false;
  }
  </code></pre>
  
  <p>My links: </p>
  
  <pre><code>&lt;a href="javascript:void(0);" 
     onclick="updateStatus(); class="statusWatching"&gt;Watching&lt;/a&gt;
  
  &lt;a href="javascript:void(0);" 
     onclick="updateStatus(); class="statusWatching"&gt;On hold&lt;/a&gt;
  </code></pre>
  
  <p>As you can see, I have multiple links that run the same function, now I just want to make sure that whichever link they click, that's the value of the text that goes to the <code>var link_text</code></p>
  
  <p>I am not using a click function so I am not sure if the current answers would work.</p>