Let's say we have the following jQuery plugins
$.accordion();
$.button();
and in a script we have the following code:
var plg = "accordion";
$('selector').plg();
plg = 'button';
$('selector').plg();
The above example, ofcource doesn't work. But is there a way to do something similar, without the usage of eval() ?
Can I execute jQuery plugins from variable ?