Scroll to top of scrollable textbox

Hi there, just have a quick question if anyone has done this before. Trying to figure out the best way to use javascript to set a scrollable lectora textbox to reset to the top position upon clicking of a button. I have tried:

function init_scroll() {

$(".IDofScrollableTextBox").scrollTop(0);

}

but this code does not seem to be working. Any help would be appreciated thanks!

Discussion (1)

I just gave it a try in a very simple example and got it working. Do you have a simple title using your code that I can look at to make sure everything is tied together correctly.

undefined

Discussions have been disabled for this post