我正在编写一个需要依赖 jQuery++ 的 jQuery 插件,但我不确定如何从我的插件中引用它。我该怎么做?
			
			1052 次
		
2 回答
            1        
        
		
您可以尝试使用jQuery.getScript()
$.getScript("other_scripts.js", function(){
   // You can use anything you defined in other_scripts.js here
});  
于 2013-05-08T09:54:20.240   回答
    
    
            0        
        
		
尝试这个:
(function($){
    $.fn.funct = function() {
        console.log('funct is running...');
    } 
    $.fn.foo = function() { 
        return this.each(function(){
            console.log('plugin is running...');
            $(this).funct();
        });
    };
})(jQuery);
从调用 jQuery 插件中的其他插件复制和修改的代码
于 2013-05-08T09:53:54.923   回答