Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery toggle no animation needed

May i blind or is there no parameter, option or whatever to disable the animations for:

.toggle()

I just want to show() and hide() them via toggle() but every toggle i use slideToggle, fadeToggle or even the normal toggle are with an animation.

How to "remove" them?

like image 409
ggzone Avatar asked Apr 30 '12 15:04

ggzone


1 Answers

Just make sure the parameter to toggle() resolves to true, not to 1.

toggle(1); // animation 
toggle(true); // no animation.
like image 169
Nicolas Avatar answered Oct 13 '22 23:10

Nicolas