Using jQuery we are appending content in this link. http://enfolytics.com/NaturallyWhite/booking If we are selecting bottom service from the list, then on next screen it will automatically focus on the first record or focus to the top of the page. Can you please help me.

Check Screenshot for better understanding. enter image description hereenter image description here

1 Answer 1


In the success part of your AJAX call for http://enfolytics.com/NaturallyWhite/photostudio/index/customerdata/?method=getCustomerData&... you'll need to add the code for scrolling to the top of the page. Or alternatively is there is any JS rendering the contents of that page you could use it that JS, it depends on your source code really.

$("html, body").animate({ scrollTop: 0 }, "slow");

Where "slow" is the animation speed, it also accepts a number in milliseconds.

It's hard for me to give a more in-depth answer without seeing your code as this isn't really related to the Magento platform.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.