jQuery hide show div doesn't work in Internet Explorer

前端 未结 5 1997
青春惊慌失措
青春惊慌失措 2020-12-19 17:18

When I click togglediv, commentdiv must be visible or hidden. The following code is running on Firefox but not Internet Explorer:

5条回答
  •  既然无缘
    2020-12-19 17:58

    There is a function toggle in jquery that does exactly what you want without having to check for visibility:

    $("#commentdiv").toggle("slow");
    

提交回复
热议问题