Scroll to the item in the Accordion?

Good day, how to make scrolling to the accordion. Clicked on the item and machine to this element has scrolled the screen, clicked on the one below for example, it immediately scrolled the screen?

Accordion.js - he's all happy, but in the mobile version depends on the number of symbols in spolare. If a lot of it and you clicked on a little, then Albano at large, there is the option to fly away in the basement...
Here site
Call it
$("#my-accordion").accordionjs({ activeIndex : false, });

How do you solve the problem?
April 4th 20 at 13:10
2 answers
April 4th 20 at 13:12
Solved the problem asked sizes
height: 200px;
 overflow: auto;

And ceased to jump
April 4th 20 at 13:14
element.scrollIntoView({behavior: "smooth"});
If and jquery touch
In the mobile version of the essence does not change, when you click into the basement sends.
 theOffset = $(this).offset();
 $(window).scrollTop( - 0);
- diamond.Nitzsche commented on April 4th 20 at 13:17
@diamond.Nitzsche, Well, so do not use scrollTop. Use scrollIntoView, as I wrote in the answer - Mitchel.Hilpert commented on April 4th 20 at 13:20

Find more questions by tags jQuery