Fix for Submit and hide a form

  1. $(document).ready(function(){
  2.  
  3.   //removes all 'Vote' submit buttons
  4.   $('.form-submit').remove();
  5.  
  6.   //adds a new submit button
  7.   $(".my-form").append('<input type="submit" value="Submit" class="jquery-submit">');
  8.  
  9.  
  10.   //when submit button is clicked, submit all forms
  11.   $('.jquery-submit').click(function(){
  12.     $('.my-form').submit();
  13.     $('.my-form').slideUp('medium', function() {
  14.         // Animation complete. Say thanks!
  15.         $(".my-form-container").append('<div class="thanks" style="opacity: 0;"><p>Thanks for submitting!</p></div>');
  16.         $('.thanks').fadeTo(500, 1);
  17.       });
  18.   }
  19. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.