📅  最后修改于: 2022-03-11 15:03:07.409000             🧑  作者: Mango
$(".progress").each((_, progress) => {
const steps = $("> div.right > div", progress);
steps.each((i, el) => $(el).mouseenter((e) => onHover(el)));
const onHover = (el) => {
steps.removeClass(["current", "prev"]);
el.classList.add("current");
$(el).prevAll().slice(1).addClass("prev");
};
});