When I click togglediv, commentdiv must be visible or hidden. The following code is running on Firefox but not Internet Explorer:
togglediv
commentdiv
There is a function toggle in jquery that does exactly what you want without having to check for visibility:
$("#commentdiv").toggle("slow");