Hello, When my form is submitted, I want to add a couple of hidden form fields to the DOM. I know that I can accomplish the task like so:
$("#myForm").submit(function() { var str = "<input type='hidden' name='myname' id='myid' value='foo' />"; $(this).append(str); }); But that just doesn't "feel" right to me. Is there a .new() method or something that would allow me to create the new element and then use the other methods (e.g. .new("input:hidden").attr("id").val("myid") ) before doing the .append() ? I'm not finding anything in the docs, so I'm guessing there is not; justwanted to check. Thanks, Matt