Combination of two Java commands

I want to combine two Java movements according to the sample site
https://rebelan.menew.pw
When the menu becomes active, it will come to center and show the selected div
Also, it should be activated and placed in the center by scrolling on the relevant page.

There are two separate movements that I want to combine

and

tanks