Столкнулся с такой проблемой.
Есть начальный код плагина
;(function($, window, document, undefined){
	var text = '',
		methods = {
			init: function(text, options){
				options = $.extend({}, $.fn.myPlugin.defaultOptions, options);
				console.log(text);
				return this;
			}
		}
	$.fn.myPlugin = function(text, method){
		if (text != '') {
			// Тут беда
			return methods['init'].apply(this, Array.prototype.slice.call(arguments, 1));
		} else {
			if (methods[method]) {
				return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
			} else if (typeof method === 'object' || ! method) {
				return methods.init.apply(this, arguments);
			} else {
				$.error('Method ' +  method + ' does not exist!');
			}
		}
	}
	$.fn.myPlugin.defaultOptions = {
		param1: false
	}
})(jQuery, window, document);
И вызов
$('body').myPlugin('foo', 'options': {
	param1: true
});
В консоли получаю
	
	| 
		 Код: 
	 | 
	missing ) after argument list
$('body').myPlugin('foo', 'options': { | 
	
Как можно передать таким образом параметры в плагин?