$('button').toggle({
function(e){
//turn on effects for all elements clicked
$('*').toggle(
function(e){
//some nice effects when you click on elements
},
function(e){
//nice effects turned off when you click again.
}
);
},
function(e){
// turn off all effects. aka unbind all click event
});
});
it doesn't quiet behave the way i expected. i wanted to basically
click the button effects are turned on when you click an element. its turned off when you click that element again.
click the button all effects are disabled.
however, what i end up with is
click the button effects are turned on when i click an element effects do not turn off when i click it again. effects turn off when i click once more.
also
click the button. effects turned on. click button again effects doesn't turn off. click button again effets turn off.
why does it do this ??