I am working on a jquery plugin, and to save time/space i want to use as much as possible variables, but if i try to replace an event of effect for an variable the code stops to work.
Is it possible to use variables for this?
The idea:
jQuery('#id').fadeIn(200);
var myEffect = fadeIn
jQuery('#id').myEffect(200);
Use bracket notation.
jsFiddle.