1

I have found many posts with the same answers on how to do this but it just isn't working for me. I can see the scrollHeight of the element I am trying to set but the scrollTop value never changes from zero. The only possible difference from a standard application of setting scrollTop and my configuration is that I am attempting to set the scrollTop of an element in a child frame. I can access the element fine via selectors through the child frame and then I can see the scrollHeight as a correct value. Setting scrollTop just doesn't do anything.

EDIT

I figured out what was wrong. A height attribute needed to be set on the node I was trying to scroll to the end of. I had

.my-elem { overflow: scroll; }

but needed

.my-elem { overflow: scroll; height: 200px; }

Community
  • 1
  • 1
Jon Rose
  • 1,457
  • 1
  • 15
  • 25
  • I dont see any examples of your code. Explaining tbe situation is nice, but we need to see what youre actually. Like what you're setting the scrollTop as – Ian Aug 10 '13 at 04:20
  • Instead of putting the answer in your (edited) question, it would be more SO-like to answer your own question instead. – machineghost Aug 08 '16 at 23:21

0 Answers0