(function($) {
$.fn.extend({
clock: function(options) {
var options = $.extend(defaults, options);
.......
.......
return this.each(function() {
var prev = function() {
console.log("hello world!");
alert('getweather');
};
$('#left').click(function() {alert(342);});
});
})(jQuery);
如何从下面的代码中调用插件函数 prev 和 $('#left')
$.fn.clock().prev(); //doesn't work
$.fn.clock('#left'); //doesn't work
提前致谢