Skip to main content
added 27 characters in body
Source Link
Nicolai Grossherr
  • 18.9k
  • 8
  • 64
  • 109
jQuery(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params + "&action=sendmail",
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
jQuery(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params,
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
jQuery(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params + "&action=sendmail",
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
added 10 characters in body
Source Link
Nicolai Grossherr
  • 18.9k
  • 8
  • 64
  • 109
$jQuery(document).ready(function($){
$jQuery(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params,
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
$(document).ready(function($){
$(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params,
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
jQuery(document).ready(function($){
jQuery(document).ready(function($){
    $("#contact_form").validate({
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            message: "required"
        },
        messages: {
            name: "Please enter your name",
            email: {
                required: "Please enter your email adress",
                email: "Please enter your valid email adress"
            },
            message: "Please enter a short message, what your inquiry is about"
        },
        submitHandler: function(form) {
            $('#loading_icon').show();
            $('#click').hide();
            var params = $(form).serialize();
            $.ajax ({
                type: 'POST',
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: params,
                success: function(response) {
                    $('#response').hide();
                    $('#response').html(response);
                    $('#response').fadeIn('slow');
                    $('#loading_icon').hide();                      
                }
            });
        }

    });
});
added 34 characters in body
Source Link
Nicolai Grossherr
  • 18.9k
  • 8
  • 64
  • 109

WordPress is running Jquery in noconflict mode. (WordPress Codex Reference)(WordPress Codex Reference) or read this brief article I posted some time ago. View it here.

WordPress is running Jquery in noconflict mode. (WordPress Codex Reference) or read this brief article I posted some time ago. View it here.

WordPress is running Jquery in noconflict mode. (WordPress Codex Reference) or read this brief article I posted some time ago. View it here.

Source Link
Matt Royal
  • 1.6k
  • 1
  • 11
  • 15
Loading