- toggle: function(a,b) {
- // If two functions are passed in, we're
- // toggling on a click
- return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){
+ toggle: function() {
+ // save reference to arguments for access in closure
+ var a = arguments;
+ return typeof a[0] == "function" && typeof a[1] == "function" ? this.click(function(e) {