[Solved] function .toggle() deprecated : what to use instead ?
Hi,
The documentation says that the .toggle() function is deprecated (http://api.jquery.com/toggle-event), but there isn't any alternative method indicated.
I searched the documentation but cound't find this piece of information. Maybe with .on() and .off() but I don't understand exactly how it works.
Well, all I want is to transform the following into something future-proof :
- var odd = function() {
- alert("odd");
- }
- var even = function() {
- alert("even");
- }
- $("#mydiv.toggle(odd, even);
Thanks for any help !