Reputation: 1276
I'm trying to scroll the followers/following div programmatically on instagram. I thought it would be the same or similar to the standard way of scrolling using javascript.
What I have tried so far:
var x = document.getElementsByClassName("_4gt3b");
x.scrollTop += 100;
I've also tried:
x.scrollBy(0,100);
The followers window does not scroll. The scrollTop variable returns Nan, and the scrollBy function returns x.scrollBy is not a function(…). Any guidance to scroll the followers/following window is greatly appreciated.
Upvotes: 1
Views: 2054
Reputation: 1276
@Cbroe's comment above in my question pointed me in the right direction, the following does what I need.
x[0].scrollTop += 100;
Upvotes: 1