dreamsqin

功能:显示被隐藏的元素,隐藏已显示的元素。

常规方法:(需要先判断元素状态)

$("button").click(function(){
            if ($(".content").css("display")=="none") 
                $(".bottom").show("slow");
            else
                $(".bottom").hide("slow");
        });

快捷方法:(自动判断)

$(".button").click(function(){
            $(".content").toggle("slow");
        });

 

分类:

技术点:

相关文章:

  • 2022-01-04
  • 2022-03-15
  • 2022-12-23
  • 2021-08-17
  • 2021-12-23
  • 2022-02-13
  • 2021-12-13
  • 2021-11-19
猜你喜欢
  • 2021-11-05
  • 2022-12-23
  • 2022-01-16
  • 2021-12-22
  • 2022-01-08
  • 2022-02-15
  • 2021-12-09
相关资源
相似解决方案