var animations = {
slide : {enter:'slideDown('+settings.speed+')', exit:'slideUp('+settings.speed+')'},
fade : {enter:'fadeIn('+settings.speed+')', exit:'fadeOut('+settings.speed+')'}
};
I currently have a literal object which has enter and exit animations defined within. Would it be possible to call these dynamically and how?
Basically, i am trying to find a way to dynamically call functions whilst keeping the code as small as possible.