title: How to get the element id of a div element that was clicked
body: <p>I'm trying to design a simple hangman game, and have a line of div elements with the ids being letters. I want to receive the id of the element that is clicked, and can't seem to figure it out.</p>
  
  <pre><code>&lt;script&gt;
  var guesses = 5;
  var word = "hangman";
  var spotsLeft = 7;
  $(document).ready(function(){
  $(".letter").click(function(){
      $(this).hide();
      guesses--;
      if(//Psuedo-code -- if a specific letter is clicked (based on element id)
      $("#guessesLeft").html("You have " + guesses + " Guesses Left");
  
      if(guesses == 0){
       $("#guessesLeft").html("You are out of guesses, YOU LOST!!!");
      }
  });
  });    
  &lt;/script&gt;
  </code></pre>