title: call a function when submit form
body: <p>I'm trying to call a function when submit form , this function showld work for all forms with div "#js_ajax_form".
  ( the javascript code works in chrome console
  // html code</p>
  
  <pre><code>     &lt;form method="post" id="js_ajax_form" data-type="user.registration" action="signup"&gt;
  
  
                          &lt;input type="text" name="val[first_name]" id="first_name" placeholder="First Name" value="" size="30"&gt;
  
  
                          &lt;input type="text" name="val[last_name]" id="last_name" placeholder="Last Name" value="" size="30"&gt;
  
  
  
  
                      &lt;input type="submit" value="Sign Up" class="button_register" id="js_registration_submit"&gt;
  
          &lt;/form&gt;
  
  // javascript
  
      var $Core = {};
      function getParam(sParam)
      {
      return oParams[sParam];
      }
  
  
      $Core.form = function()
      {
      $("#js_ajax_form").submit(function(e)
      {
          var postData = $(this).serializeArray();
  
          alert(postData);
  
          e.preventDefault(); //STOP default action
          e.unbind(); //unbind. to stop multiple form submit.
      }); 
  
  
      }
  </code></pre>