title: jQuery - Show and hide button
body: <p>I have written a script that shows a submit button when clicking inside an input area. And when clicking outside the input, the button should be hidden. There are several areas and buttons, therefore I have assigned a unique ID to every button and area.</p>
  
  <p>The problem is: When I click the area, the button shows. But when clicking outside, nothing happens. The script works if I only have one button and area, but when assigning IDs, it stops working...</p>
  
  <pre><code>$(".textarea").click(function(e) {
      var cid = $(this).attr('rel');
  
      $("#submit" + cid).show();
      e.stopPropagation();
  });
  
  $(document).click(function() {
      $("#submit" + cid).hide();
  });
  </code></pre>