Changing options after plugin used
So I want my plugin to be able to change it's options AFTER the plugin has been used on an element. Something like this:
$("elem").plugin.options.someOption="something"
This is how my plugin is set up:
- $.fn.fileSelect=function(options,callback){
var defaults={
dir : '/',
exts : 'php',
phpFile : 'get_files.php'
};
return this.each(function(){
var opts=$.extend({}, defaults, options);
//plugin code
});
};
I thought I could do $("elem").fileselect.opts.dir="/", but opts comes up as a non-existent variable.