Skip to content
Advertisement

Tag: js-scrollintoview

What is the difference between the different scroll options?

I have tried a few ways of adding scrolling to tables, but just one of them works correctly. What is the different between them? First: Second: Third: Fourth: Answer Element.scrollIntoView() Element.scrollIntoView() method scrolls the element on which it’s called into the Viewport of the browser window. Syntax: element.scrollIntoView() element.scrollIntoView(alignToTop) // Boolean parameter element.scrollIntoView(scrollIntoViewOptions) // Object parameter Your usecases: executeScript(“arguments[0].scrollIntoView();”, Element):

Does scrollIntoView work in all browsers?

Does scrollIntoView() work in all browsers? If not is there a jQuery alternative? Answer It is supported yes, but user experience is… bad. As @9bits pointed out, this has long been supported by all major browsers. Not to worry about that. The main problem is the way that it works. It simply jumps to a particular element that may as

Advertisement