Contact Form Script not sending the form

前端 未结 1 1066
轻奢々
轻奢々 2021-01-29 13:55

I have this PHP contact form script (as shown below) which I have used before so I know works, BUT, due to that I have hidden the html form inside of a new jQuery powered div:

1条回答
  •  有刺的猬
    2021-01-29 14:20

    Try using

    $(".submit_button").on("click", function(){
    

    instead of '$(".submit_button").live("click", function(){

    From jQuery Docs:

    As of jQuery 1.7, the .live() method is deprecated

    also try to use

    $('#my-form').submit(function() {
      alert('Handler for .submit() called.');
      return false;
    });
    

    and set an action in your html form like so:

    0 讨论(0)
提交回复
热议问题