Good evening, tell me why the function works incorrectly, in the body I created a container for custom scrolling, scrolbars are connected to js below, by the condition of pevraya, the function should attach scrolls to a certain class if the width is over 666 pixels, otherwise destroy, the second function for another container kills scrolls if the width is less than 424 pixels and otherwise it adds scrolling, I don’t quite understand why the first function is currently working when the container is not created, but it is working on the container of the second function, those scroll -So fig atachitsya if the container width is greater than 666 pixels, although not subject to such a test if the first function to remove then works as it should.
` https://jsfiddle.net/4fqh2oy5/9/ ` Линк на фидл
$('.dash__content__tabs__scroll')- all elements with this class are selected here - Grundy