$("#form").reset() should work if it is a correct form. (We attempt to trigger the default event wherever possible.)
Ohhhh.... wow, I just opened up the starterfile zip - it uses a version of jQuery that's pre-dates jQuery 1.0! Yikes. No wonder the code was acting strange for you. JJ - Try using a copy of jQuery from here: http://jquery.com/src/jquery-latest.js --John On 4/5/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
That looks like an error in the tutorial. It should be: $("#form")[0].reset(); > I got stuck in the following section, couldn't make it work: > > $(document).ready(function() { > // use this to reset a single form > $("#reset").click(function() { > $("#form").reset(); > }); > }); > > I modified the values of the form's fields and when I clicked on the > Reset link, nothing happened, I tried it in Firefox (Linux and > windows) and ie 7. > > I updated to the latest jquery.js and this time firebug says there is > an error: > > $("#form").reset is not a function > > So, am I doing something wrong or should I ignore that section of the > tutorial?