src/roundslider.js
function CreateRoundSlider(options, args) {

        for (var i = 0; i < this.length; i++) {
            var that = this[i], instance = $.data(that, pluginName);
            if (!instance) {
                var _this = new RoundSlider(that, options);
                _this._saveInstanceOnElement();
                _this._saveInstanceOnID();
				
                if (_this._raise("beforeCreate") !== false) {
                    _this._init();
                    _this._raise("create");
                }
                else _this._removeData();
            }
            else if ($.isPlainObject(options)) {
                if (typeof instance.option === "function") instance.option(options);
                else if (that.id && window[that.id] && typeof window[that.id].option === "function") {
                    window[that.id].option(options);
                }
            }
            else if (typeof options === "string") {
                if (typeof instance[options] === "function") {
                    if ((options === "option" || options.indexOf("get") === 0) && args[2] === undefined) {
                        return instance[options](args[1]);
                    }
                    instance[options](args[1], args[2]);
                }
            }
        }
        return this;
    }
function CreateRoundSlider(options, args) {

        for (var i = 0; i < this.length; i++) {
            var that = this[i], instance = $.data(that, pluginName);
            if (!instance) {
                var _this = new RoundSlider(that, options);
                _this._saveInstanceOnElement();
                _this._saveInstanceOnID();
				
                if (_this._raise("beforeCreate") !== false) {
                    _this._init();
                    _this._raise("create");
                }
                else _this._removeData();
            }
            else if ($.isPlainObject(options)) {
                if (typeof instance.option === "function") instance.option(options);
                else if (that.id && window[that.id] && typeof window[that.id].option === "function") {
                    window[that.id].option(options);
                }
            }
            else if (typeof options === "string") {
                if (typeof instance[options] === "function") {
                    if ((options === "option" || options.indexOf("get") === 0) && args[2] === undefined) {
                        return instance[options](args[1]);
                    }
                    instance[options](args[1], args[2]);
                }
            }
        }
        return this;
    }
function CreateRoundSlider ( options , args ) { for ( var i = 0 ; i < this . length ; i ++ ) { var that = this [ i ] , instance = $ . data ( that , pluginName ) ; if ( ! instance ) { var _this = new RoundSlider ( that , options ) ; _this . _saveInstanceOnElement ( ) ; _this . _saveInstanceOnID ( ) ; if ( _this . _raise ( "beforeCreate" ) !== false ) { _this . _init ( ) ; _this . _raise ( "create" ) ; } else _this . _removeData ( ) ; } else if ( $ . isPlainObject ( options ) ) { if ( typeof instance . option === "function" ) instance . option ( options ) ; else if ( that . id && window [ that . id ] && typeof window [ that . id ] . option === "function" ) { window [ that . id ] . option ( options ) ; } } else if ( typeof options === "string" ) { if ( typeof instance [ options ] === "function" ) { if ( ( options === "option" || options . indexOf ( "get" ) === 0 ) && args [ 2 ] === undefined ) { return instance [ options ] ( args [ 1 ] ) ; } instance [ options ] ( args [ 1 ] , args [ 2 ] ) ; } } } return this ; }
The plugin wrapper, prevents multiple instantiations
The plugin wrapper prevents multiple instantiations