[jQuery] Form functionaltiy - scroll to top of page on submission

[jQuery] Form functionaltiy - scroll to top of page on submission


Below is a block of code from a Wordpress plugin called "MM Forms", which
handles form creation.
The part of the code below deals with what happens when a form is submitted,
which I believe is around this part:
    if (1 == data.mailSent) {
        jQuery(data.into).find('form').resetForm().clearForm();
        mmfResponseOutput.addClass('mmf-mail-sent-ok');
    } else {
        mmfResponseOutput.addClass('mmf-mail-sent-ng');
    }
    mmfResponseOutput.append(data.message).fadeIn('fast');
    if (data.message.toLowerCase().indexOf('thanks')>=0)
    jQuery(data.into).find('form').hide();
From what I am gathering, this is resetting / clearing the form, fading in a
sucess message div and hiding the form.
This is all great, but I want to add one other bit of functionality - to
scroll to the top of the page.
Does anyone have any suggestions as to how the code coulod be modified to
achieve this?
Many thanks
--
View this message in context: http://www.nabble.com/Form-functionaltiy---scroll-to-top-of-page-on-submission-tp24122889s27240p24122889.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.