title: JQuery. Remove element by attribute name. How?
body: <p>Is there a way to remove a DIV based on it's custom attribute comment_id?</p>
  
  <p>I have the following code but it does not quite work yet.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $('.delete_comment').live('click', function() {
          // Url we request data from
          $.get( "http://www.site.com/pages/delete/user_comment.php",
          // Url parameters to send 
          {id:$(this).attr('comment_id'),c:'yes'},
          // Output data from php file generated by PHP echo.
          function(data)
          { 
              var comment_id = $(this).attr('comment_id').val();
              //alert(comment_id);
              if (comment_id == data) {
  
                  $(this).remove();
  
              }
  
          });
  
      });
  &lt;/script&gt;
  </code></pre>