enter image description here

There are such tabs. How to correctly calculate how much to move the scroll, when activating hidden tabs (ie, those that go after "More Tab").

var tabNavigation_width = parseInt($tabNavigationContainer.width()); // ΡˆΠΈΡ€ΠΈΠ½Π° Π½Π°Π²ΠΈΠ³Π°Ρ†ΠΈΠΎΠ½Π½ΠΎΠΉ строчки var selected_position = parseInt($tabNavigationItem_selected.position().left); // позиция Π²Ρ‹Π΄Π΅Π»Π΅Π½Π½ΠΎΠΉ Π²ΠΊΠ»Π°Π΄ΠΊΠΈ ΠΎΡ‚Π½ΠΎΡΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ родитСля var selected_width = parseInt($tabNavigationItem_selected.outerWidth(true)); // ΡˆΠΈΡ€ΠΈΠ½Π° Π²Ρ‹Π΄Π΅Π»Π΅Π½Π½ΠΎΠΉ Π²ΠΊΠ»Π°Π΄ΠΊΠΈ if ((selected_position + selected_width) > tabNavigation_width) { $tabNavigationContainer.scrollLeft($tabNavigationContainer.scrollLeft() + selected_width); } 

I did it differently, everything is somehow wrong.

    0