I have a set of jquery plugins as follows:-
fooADD(options)
fooSUB(options)
fooDIV(options)
....
I then have a plugin that acts on a with an attribute data-plugin=""
So for:-
<DIV data-plugin="fooADD">
I want to run the code:-
var item = $('<div/>').fooADD({'option':'value'});
How can I achieve this such that I can keep adding new foo plugins which can be selected from data-plugin without the need to update an array of function lookups?