In Jquery i\'d like to disable any plugin I want by changing a variable name. However the following code doesnt work
function disablePlugin(functionName) {
This is how you would do that:
function disablePlugin(functionName) { $('#divID')[functionName]('disable') } disablePlugin('sortable');
This works because someObject.foo is the same thing as someObject['foo']
someObject.foo
someObject['foo']