Through trial and error, I found the right selector. But this selector allows to select each slider separately, because the class name for each slide includes the slider id number. Is it possible to assign one class to all slides? (Assigning a class in Developer Options doesn’t help, I’ve tried it).
.slider-51 {
border-radius:61px
}
It worked when I wrote the JavaScript. Maybe someone could use it.
document.addEventListener('DOMContentLoaded', () => {
// Select all elements
const allElements = document.querySelectorAll('*');
// Define the regex pattern for class names starting with "slider-" followed by a number
const sliderClassPattern = /^slider-\d+$/;
// Loop through each element and check if any class name matches the pattern
allElements.forEach(element => {
element.classList.forEach(className => {
if (sliderClassPattern.test(className)) {
// Set the border-radius property
element.style.borderRadius = '61px';
}
});
});
});
Hi @ll2pakll
in cases like this we would recommend this selector, where 123 needs to be replaced with the actual slideshow ID:
#metaslider-id-123 ul.slides > li {
}
Regards