code work for once and stop
<pre><code>&lt;script&gt;
    $('.alert_success').hide();
    $('.alert_error').hide();
    $('.trash').click(function(){
        var r=confirm("wil delete")
        if (r==true)
        {
            var id = $(this).attr('id');
            $.post('ajax/del_art.php',{id:id},function(data){
                $("#concon").fadeOut(1000);
                $('.alert_success').fadeIn(1000);
                $('.alert_success').html(data);
                $('.alert_success').delay(5000);
                $('.alert_success').fadeOut(1000);
            });
        }
    });
</code></pre>

<p>When I click to delete, the code works for once (id #concon) and stops.  How can replace <code>#concon</code>  with <code>$(this)</code>?</p>

<p>I want the item to delete and hide when I press delete.</p>

<p><a href="http://behiramp.com/admin/article.php" rel="nofollow">http://behiramp.com/admin/article.php</a></p>

<p>Try delete any post it will work fine.  Try delete next post it will work fine.</p>

<p>now  i mack </p>

<pre><code>&lt;script&gt;
$('.alert_success').hide();
$('.alert_error').hide();
$('.trash').click(function(){
 var r=confirm("سوف يتم حذف الموضوع الى الابد!")
  if (r==true)
    {
      id = $(this).attr('id');
        $.post('ajax/del_art.php',{id:id},function(data){
         if($(".concon").hasClass(data))
           {
              $(".concon").fadeOut(1000);
              $('.alert_success').fadeIn(1000).html(data).delay(3000).fadeOut(1000);
           }

         });
  }
</code></pre>

<p>});</p>

<p>in hasclass it back with "date" not content data how can  .hasClass() back with Variable</p>
