Looking for a way to pre-select a certain category in your Video Gallery widget? We’ve got a simple solution!
const ACTIVE_TAB = 2;
util.waitForElement(`.es-tabs-slider-item:nth-child(${ACTIVE_TAB}) .es-tab-item-container`).then(tab => tab.click());
Replace 2 in the 1st line of the code with the number of the tab you want to pre-select and add the resulted code to the Custom JS field on the Settings tab of your widget’s settings.
Note: Custom JS doesn’t function in the preview mode, so you can check the result right on your website or through the Share Link