But sometimes there are cases when you need to modify a component via javascript, like changing the style, or color theme of the component or highlighting the active tab when you click on it. For such cases, all the names of modifier classes are contained in the comments at the top of the component template. You can assign them via custom JavaScript code on the page.
Example:
// tabs toggler depending on the visibility in the window$('.masterstudy-course-player-content__wrapper').on('scroll',function() { let materialsTab = $('.masterstudy-course-player-header .masterstudy-tabs__item[data-id="materials"]'), lessonTab = $('.masterstudy-course-player-header .masterstudy-tabs__item[data-id="lesson"]'), materialsInView = isElementInView('.masterstudy-course-player-lesson-materials');if (materialsInView) { materialsTab.addClass('masterstudy-tabs__item_active'); lessonTab.removeClass('masterstudy-tabs__item_active'); } else { materialsTab.removeClass('masterstudy-tabs__item_active'); lessonTab.addClass('masterstudy-tabs__item_active'); }});functionisElementInView(selector) { let element = document.querySelector(selector), rect = element.getBoundingClientRect();return ( rect.top >=0&& rect.left >=0&& rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth) );}