Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function() {
- $("input[name$='sel']").click(function() {
- var test = $(this).val();
- $("div.desc").hide();
- $("#sel" + test).show();
- });
- if(test == "CreditCard"){
- $("#card").addClass("validate[custom[card]] text-input");
- }
- else {
- $("#card).removeClass("validate[custom[card]] text-input");
- }
- });
- </script>
- <p>
- Credit/Debit Card<lable style="margin-right:1px;"></lable><input type="radio" name="sel" id="sel" value="CreditCard" />
- </p>
- <p>
- Paypal<input type="radio" id="sel" name="sel" value="Paypal" />
- </p>
- <p>
- Wire Transfer<input type="radio" id="sel" name="sel" value="WireTransfer" />
- </p>
- <!====================================================================================>
- </td><td>
- <!====================================================================================>
- <div id="selCreditCard" class="desc">
- <label for="card"><strong>Card Number<font color=red size=3> *</font></strong></label>
- <input name="card" type="text" id="card" value="" style="width:85px;" />
- </div>
- <!====================================================================================>
- <div id="selPaypal" class="desc" style="display: none;margin-left:20px;margin-top:1px;margin-bottom:1px;">
- paypal
- </div>
- <!====================================================================================>
- <div id="selWireTransfer" class="desc" style="display: none;margin-left:20px;margin-top:0px;margin-bottom:-5px;">
- Transfer
- </div>
- <!====================================================================================>
- </td></tr></table>
-
- class="validate[custom[card]] text-input"
- <input type="radio" id="sel1" name="sel"> Credit/Debit Card
- <br>
- <input type="radio" id="sel2" name="sel"> Paypal
- <br>
- <input type="radio" id="sel3" name="sel"> Wire Transfer
- <br>
- <br>
- <div id="selCreditCard" class="desc">
- Card Number <input name="card" type="text" id="card" value="">
- </div>
- $('#sel1').click(function() { $('#card').addClass('nowitsadded') })
- .nowitsadded {background-color: red}
Add Comment
Please, Sign In to add comment