title: Preventing form submission after validation by parsley.js
body: <p>I have used parsley.js many times and have literally copied the code from my last use of parsley.</p>
  
  <p>However, every time I submit the form the page refreshes. <code>preventDefault</code> seems to work on my other pages and stops the page from refreshing but for some reason when I tried now it won't work. Can anyone figure out why not?</p>
  
  <pre><code>&lt;script&gt;
      $(function(){
          $("#register_signup").submit(function(e){
              e.preventDefault();
              var form = $(this);
              if ($('#rform').parsley( 'isValid' )){
                  alert('valid');
              }
          });
      });
  &lt;/script&gt;
  
  &lt;form id='rform' name='rform' data-parsley-validate&gt;
      &lt;input id='reg_password' class='register_input' type='text'  autocomplete="off" data-parsley-trigger="change" placeholder='Password' required&gt;
      &lt;input id='reg_cpassword' class='register_input' type='text' name="reg_cpassword" placeholder='Confirm password' data-parsley-equalto="#reg_password" required&gt;
  
      &lt;input id='register_signup' type="submit" onClick="javascript:$('#rform').parsley( 'validate' );" value='Sign Up' /&gt;
  &lt;/form&gt;
  </code></pre>