I want to use a function to add a function. How do I do it?
$.test.addCommand('test',function(id){
alert('hey'+id);
});
$.extend({
test: {
commands:{}
,
addCommand:function(a,b){
//something like this? $.test.commands=$.extend({$.test.commands},{a:b});
// test it- eval('$.test.'+a+'()');
}
}