06-02-2023, 02:32 AM
According to ChatGPT this is the jQuery to solve that issue but I don't know if it would actually work... if it did though, hats off to ChatGPT.
$(document).ready(function() {
var $element = $("div > blockquote");
var depth = 1;
while ($element.length) {
$element.css("background", depth % 2 === 0 ? "blue" : "red");
$element = $element.children("blockquote");
depth++;
}
});
$(document).ready(function() {
var $element = $("div > blockquote");
var depth = 1;
while ($element.length) {
$element.css("background", depth % 2 === 0 ? "blue" : "red");
$element = $element.children("blockquote");
depth++;
}
});
