You can use jquery plugin scrollTo : here is the demo : http://demos.flesler.com/jquery/scrollTo/
On Jun 20, 12:52 pm, juxprose <d...@delarge.co.uk> wrote: > 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-s... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.