I have a text area, and I have two buttons.
I want to scroll 10px horizontally (to the right) when the button is clicked, and to the left (also 10px) when the second one is clicked.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
what do you mean by text area?
Is it the
<textarea>elemnt or do you just have a div or a span with some text in it?in any case if you just want to scroll contents left or right, you might want to use
scrollLeftproperty on a container.element.scrollLeft += 10;will scroll to the right.element.scrollLeft -= 10;will scroll to the left.If you give a more clearer description of what you are trying to do, then maybe people here can help you out better.