Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <script type="text/javascript">
  2. jQuery(function() {
  3. function setDonationTotal(totalAsString) {
  4. var totalAmt = Number(totalAsString.replace(/[^\d\.]/g, ''));
  5. if(totalAmt) {
  6. jQuery('#input_34_51').val(totalAmt);
  7. } else {
  8. jQuery('#input_34_51').val(0);
  9. }
  10. }
  11.  
  12. jQuery("#ginput_base_price_34_41").bind("change", function() {
  13. setDonationTotal(jQuery(this).val());
  14. });
  15. jQuery("#ginput_base_price_34_40").bind("change", function() {
  16. setDonationTotal(jQuery(this).val());
  17. });
  18. setTimeout(function() {
  19. setDonationTotal("$30.90");
  20. }, 1000);
  21. });
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement