diff options
Diffstat (limited to 'webroot/js/jquery.form.js')
-rw-r--r-- | webroot/js/jquery.form.js | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/webroot/js/jquery.form.js b/webroot/js/jquery.form.js index e9d5df5..d0e118e 100644 --- a/webroot/js/jquery.form.js +++ b/webroot/js/jquery.form.js @@ -1,37 +1,37 @@ -jQuery(document).ready(function(){
-
- $('#contactform').submit(function(){
-
- var action = $(this).attr('action');
-
- $("#message").slideUp(750,function() {
- $('#message').hide();
-
- $('#submit')
- .after('<img src="./img/form/ajax-loader.gif" class="loader" />')
- .attr('disabled','disabled');
-
- $.post(action, {
- name: $('#name').val(),
- email: $('#email').val(),
- subject: $('#subject').val(),
- comments: $('#comments').val(),
- verify: $('#verify').val()
- },
- function(data){
- document.getElementById('message').innerHTML = data;
- $('#message').slideDown('slow');
- $('#contactform img.loader').fadeOut('slow',function(){$(this).remove()});
- $('#contactform #submit').attr('disabled','');
- if(data.match('success') != null) $('#contactform').slideUp('slow');
-
- }
- );
-
- });
-
- return false;
-
- });
-
+jQuery(document).ready(function(){ + + $('#contactform').submit(function(){ + + var action = $(this).attr('action'); + + $("#message").slideUp(750,function() { + $('#message').hide(); + + $('#submit') + .after('<img src="./img/form/ajax-loader.gif" class="loader" />') + .attr('disabled','disabled'); + + $.post(action, { + name: $('#name').val(), + email: $('#email').val(), + subject: $('#subject').val(), + comments: $('#comments').val(), + verify: $('#verify').val() + }, + function(data){ + document.getElementById('message').innerHTML = data; + $('#message').slideDown('slow'); + $('#contactform img.loader').fadeOut('slow',function(){$(this).remove()}); + $('#contactform #submit').attr('disabled',''); + if(data.match('success') != null) $('#contactform').slideUp('slow'); + + } + ); + + }); + + return false; + + }); + });
\ No newline at end of file |