title: jQuery not working after form validation failure
body: <p>I have the form below and I have a jquery snippetwhich adds <code>$</code> to the beginning of the user's input whether they type it or not.</p>
  
  <p>If i submit the form and it fails on validation, my jquery snippet no longer works to prepend the <code>$</code> to the user's input. </p>
  
  <p>Why does this not work after form validation?</p>
  
  <pre><code>&lt;h:form id="add"&gt;
  
      &lt;h:outputLabel for="startDate" value="Start Date" /&gt;
      &lt;h:panelGrid columns="1"&gt;
          &lt;p:message for="startDate" /&gt;
          &lt;p:calendar value="#{fundingBacker.startDate}" id="startDate" mode="popup" navigator="true" required="true" requiredMessage="Start Date is required" /&gt;
      &lt;/h:panelGrid&gt;
  
      &lt;h:outputLabel for="totalCost" value="Total Cost" /&gt;
      &lt;h:panelGrid columns="1"&gt;
          &lt;p:message for="totalCost" /&gt;
      &lt;p:inputText value="#{fundingBacker.totalCost}" id="totalCost" styleClass="currency"&gt;
          &lt;f:convertNumber currencySymbol="$" groupingUsed="#{true}" maxFractionDigits="0" type="currency"&gt;&lt;/f:convertNumber&gt;
      &lt;/p:inputText&gt;
      &lt;/h:panelGrid&gt;
  
      &lt;p:commandButton value="Add Grant" type="submit"  actionListener="#{fundingBacker.add}"  /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>jQuery snippet</p>
  
  <pre><code> $(document).ready(function() {
          $('.currency').on('keyup', function() {
          console.log('keyup');
          if($(this).val().indexOf('$') == -1) {
              $(this).val('$'+$(this).val()); 
          }
          });
      }
  </code></pre>