📌  相关文章
📜  jquery 代码到 javascript 转换器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:07.409000             🧑  作者: Mango

代码示例3
$(".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");
  };
});