I've been trying to find this solution for the past few hours, but no luck so far. How could i select some text (actually found that one already, but haven't tested completely yet) in a textarea and force it to scroll to that text? I've tried using scrollTop, but i don't really know how to calculate it properly with the number of lines of the wrapping textarea in mind.
Think this would be good for what you're trying to do:
http://flesler.blogspot.com/2007/10/jqueryscrollto.html
Can use it to scroll DOM elements, in this case the text you're selecting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With