title: ajax clean up if possible on submit
body: <p>i have this piece of code that finally works for me</p>
  
  <pre><code>  $(function(){
        $('.submit1').click(function(){
            $.ajax({
                type: "POST",
                url: "delanno.php",
                data: $("#myform1").serialize(),
                beforeSend: function(){
                    $('#result').html('&lt;img src="images/loading.gif" /&gt;');
                },
                success: function(data){
                    $('#result').html(data);
                }
            });
        });
        $('.deleter').on('click', function(){
            $(this).closest('.announce-box').remove();
        }) 
    }); 
  
      $(function(){
        $('.submit2').click(function(){
            $.ajax({
                type: "POST",
                url: "delanno.php",
                data: $("#myform2").serialize(),
                beforeSend: function(){
                    $('#result').html('&lt;img src="images/loading.gif" /&gt;');
                },
                success: function(data){
                    $('#result').html(data);
                }
            });
        });
        $('.deleter').on('click', function(){
            $(this).closest('.announce-box').remove();
        }) 
    }); 
        $(function(){
        $('.submit3').click(function(){
            $.ajax({
                type: "POST",
                url: "delanno.php",
                data: $("#myform3").serialize(),
                beforeSend: function(){
                    $('#result').html('&lt;img src="images/loading.gif" /&gt;');
                },
                success: function(data){
                    $('#result').html(data);
                }
            });
        });
        $('.deleter').on('click', function(){
            $(this).closest('.announce-box').remove();
        }) 
    }); 
  </code></pre>
  
  <p>is it possible to combine all 3 sets into 1 piece of code?</p>