我对jQuery插件royalSlider
的行为很奇怪。我知道在运行时该函数存在并且在jQuery对象中。
console.info(jQuery.fn.royalSlider);
//function (b){var f=arguments;return this.each(function(){var =l(this);if("object"===typeof ||!b)c.data("royalSlider")||c.data("royalSlider",new (c,b));else if((c=c.data("royalSlider"))&&c[b])return [b].apply(c,Array.prototype.slice.call(f,1))})}
但是直接在此console.info royalSlider
函数下运行将返回undefined:
$('#rsGallery').royalSlider(this.options);
//TypeError: $(...).royalSlider is not a function
royalSlider
对象上的jQuery
是怎样的,而jQuery
选择器却不是这样?