title: jQuery(document).ready shouldn't run when I submit the form
body: <p>I wrote some jquery that runs when a certain page loads, and it's good. The problem is that it also runs when I submit the form, and it messes up the submission.</p>
  
  <p>Is there any way to get around that?</p>
  
  <p>My form: <a href="http://goinspire.com/jwrp-hotel-registration/" rel="nofollow">http://goinspire.com/jwrp-hotel-registration/</a></p>
  
  <p>And the jquery file: <a href="http://goinspire.com/wp-content/themes/goinspire/js/customjqueryfunctions.js" rel="nofollow">http://goinspire.com/wp-content/themes/goinspire/js/customjqueryfunctions.js</a></p>
  
  <p>Thanks!</p>
  
  <p>Here is the part of the code that I believe is pertinent:</p>
  
  <pre><code>// CUSTOM JAVASCRIPT FUNCTIONS
  jQuery(document).ready(function () {
      tripFilter = function () {
          var tripClass = '.hotel-trip select',
              hotelClass  = '.hotel-name select',
              unusedClass = '.unused-options select';
          var tripSelect = jQuery(tripClass),
             trip = tripSelect.val(),
             hotelSelect = tripSelect.parents('form').find(hotelClass);
  
          if (trip !== undefined &amp;&amp; trip !== "") {
              if (trip === "none"){
                  jQuery(hotelClass+" &gt; option").each(function() {
                      jQuery(this).clone().appendTo(unusedClass);
                      jQuery(this).remove();
                  }); 
              } else {
                  tripnum =  trip.match(/JWRP (\d*)/)[1];
  
                  jQuery(unusedClass+" &gt; option").each(function() {
                      jQuery(this).clone().appendTo(hotelClass);
                      jQuery(this).remove();
                  });
                  jQuery(hotelClass+" &gt; option").each(function() {
                      hotelMatch = jQuery(this).val().match(/(\d*) /);
                      if(jQuery(this).val() != "Other|"){
                          if (hotelMatch === null || hotelMatch[1] != tripnum){
                              jQuery(this).clone().appendTo(unusedClass);
                              jQuery(this).remove();
                          };
                      }else{
                          jQuery(this).appendTo(hotelClass);
                      };
                  });
                  jQuery(hotelClass + 'option[value="Other|"]').insertAfter(hotelClass + 'option:last-child');
                  jQuery(hotelClass).val(jQuery(hotelClass + "option:first").val());
              }
          }
      }
  
      jQuery('.hotel-trip select').change(function(){
          tripFilter();
      });
  
      tripFilter();
  });
  </code></pre>