Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set certain form inputs to certain values using jquery
- $(document).ready(function() {
- $("#link-1").click(function() {
- $('[name=price]','#myform').val('0.00');
- });
- });
- $(document).ready(function() {
- $("#link-1").click(function(e) {
- $('#myform').find('input[name="price[]"]').val('0.00');
- e.preventDefault(); // use prevent default instead of inline js on the link.
- });
- });
- $('#myform input[name="price[]"]').val('0.00');
- $(function() {
- $("#link-1").click(function() {
- $("input[name^=price\[]", "#myform").val('0.00');
- return false;
- });
- });
Add Comment
Please, Sign In to add comment