I am looking to apply a specific style property to all child elements between the "day-start" and "day-end" classes.
https://i.sstatic.net/FS6vf.png
I attempted using code similar to this:
document.querySelectorAll('.day').forEach(
el => el.querySelectorAll('div').forEach(
el => el.style.color = 'red'
)
);
However, I am unsure on how to target elements specifically between these two classes.
Using jQuery with:
$(".day-start").nextUntil(".day-end").addClass("foo");
successfully adds the class to the correct element but encounters issues with table row tags and does not include the .day-start and .day-end classes.
Is there a way to add the class to all content with a background color applied as an alternative solution?