给点击的<li></li>标签增加一个样式

$("li").click(function () {
    $(this).siblings().removeClass("active");
    $(this).addClass("active");
});

 

来源:https://blog.csdn.net/yuzhoaheyou/article/details/80696465

相关文章:

  • 2021-12-22
  • 2021-10-18
  • 2022-12-23
  • 2021-10-29
  • 2021-12-26
  • 2021-12-26
  • 2021-06-10
猜你喜欢
  • 2022-01-01
  • 2021-12-26
  • 2021-12-26
  • 2021-05-31
  • 2021-12-26
  • 2021-09-07
相关资源
相似解决方案