daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Aug 18th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. set certain form inputs to certain values using jquery
  2. $(document).ready(function() {
  3.     $("#link-1").click(function() {
  4.  
  5. $('[name=price]','#myform').val('0.00');
  6.       });  
  7. });
  8.    
  9. $(document).ready(function() {
  10.     $("#link-1").click(function(e) {
  11.         $('#myform').find('input[name="price[]"]').val('0.00');
  12.         e.preventDefault(); // use prevent default instead of inline js on the link.
  13.     });
  14. });
  15.    
  16. $('#myform input[name="price[]"]').val('0.00');
  17.    
  18. $(function() {
  19.     $("#link-1").click(function() {
  20.         $("input[name^=price\[]", "#myform").val('0.00');
  21.         return false;
  22.     });
  23. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top