daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. $(document).ready(function() {
  3.     $("input[name$='sel']").click(function() {
  4.         var test = $(this).val();
  5.  
  6.         $("div.desc").hide();
  7.         $("#sel" + test).show();
  8.     });
  9.     if(test == "CreditCard"){
  10.     $("#card").addClass("validate[custom[card]] text-input");
  11.     }
  12.     else {
  13.     $("#card).removeClass("validate[custom[card]] text-input");
  14.     }
  15.  
  16. });
  17. </script>
  18.    
  19. <p>
  20. Credit/Debit Card<lable  style="margin-right:1px;"></lable><input type="radio" name="sel" id="sel"  value="CreditCard" />
  21. </p>
  22. <p>
  23. Paypal<input type="radio" id="sel"  name="sel" value="Paypal"   />
  24. </p>
  25. <p>
  26. Wire Transfer<input type="radio" id="sel"  name="sel" value="WireTransfer"  />
  27. </p>
  28. <!====================================================================================>
  29. </td><td>
  30. <!====================================================================================>
  31. <div id="selCreditCard" class="desc">
  32.  
  33. <label for="card"><strong>Card Number<font color=red size=3> *</font></strong></label>
  34.         <input name="card"   type="text"  id="card" value=""  style="width:85px;" />  
  35. </div>
  36. <!====================================================================================>
  37. <div id="selPaypal" class="desc" style="display: none;margin-left:20px;margin-top:1px;margin-bottom:1px;">
  38.     paypal
  39. </div>
  40. <!====================================================================================>
  41. <div id="selWireTransfer" class="desc" style="display: none;margin-left:20px;margin-top:0px;margin-bottom:-5px;">
  42.  
  43. Transfer
  44.  
  45. </div>
  46. <!====================================================================================>
  47. </td></tr></table>
  48.    
  49. class="validate[custom[card]] text-input"
  50.    
  51. <input type="radio" id="sel1" name="sel"> Credit/Debit Card
  52.  
  53. <br>
  54.  
  55. <input type="radio" id="sel2" name="sel"> Paypal
  56.  
  57. <br>
  58.  
  59. <input type="radio" id="sel3" name="sel"> Wire Transfer
  60.  
  61. <br>
  62. <br>
  63.  
  64. <div id="selCreditCard" class="desc">
  65.     Card Number <input name="card" type="text" id="card" value="">
  66. </div>
  67.    
  68. $('#sel1').click(function() { $('#card').addClass('nowitsadded') })
  69.    
  70. .nowitsadded {background-color: red}
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top