You gonna have to refactor the code to get it working. Consider using the jQuery Boilerplate:
;(function ( $, window, undefined ) {
var pluginName = 'convertSelect',
document = window.document,
defaults = {
propertyName: "value"
};
function Plugin( element, options ) {
this.element = element;
this.options = $.extend( {}, defaults, options) ;
this._defaults = defaults;
this._name = pluginName;
this.init();
}
Plugin.prototype = {
// Private methods start with underscore
_generateMarkup: function() {
// you can access 'this' which refers to the constructor
// so you have access the all the properties an methods
// of the prototype, for example:
var o = this.options
},
// Public methods
slideDownOptions: function() { ... }
}
$.fn[ pluginName ] = function ( options ) {
return this.each(function () {
if (!$.data( this, 'plugin_' + pluginName ) ) {
$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
}
});
};
}(jQuery, window));
Then you can can call public methods like so:
var $select = $('select').convertSelect().data('plugin_convertSelect');
$select.slideDownOptions();
I had a similar problem with a project of mine, I recently had to refactor the whole thing because I was polluting the jQuery namespace with too many methods. The jQuery Boilerplate works very well, it's based on the official jQuery guide but with some twists. If you wanna see this plugin pattern in action take a look at https://github.com/elclanrs/jq-idealforms/tree/master/js/src.