2

Please check my jsfiddle.

Here is the full screen view..

http://jsfiddle.net/zKhwe/embedded/result/

Please click add more link until you reach the bottom of the page. Then click select a name link. A modal will appear. Just select any name and it will fill the text field.

My problem is after filling the text field, the page scrolled to top automatically.

Can anyone help me to fix this issue?

Here is my source code http://jsfiddle.net/zKhwe/

1 Answer 1

2

Use event.preventDefault() in your click handlers - the page scrolls to the top because you're navigating to # when your links are clicked.

Fixed fiddle: http://jsfiddle.net/zKhwe/1/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.