How to call functions that are nested inside a JQuery Plugin?
问题 My goal is to be able to call functions that are inside my JQuery plugin. What is the correct syntax? For example, this does not work: <a href="#" id="click_me">Click Me</a> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> (function($) { $.fn.foo = function(options) { do_stuff = function(){ console.log("hello world!"); // works do_other_stuff = function(){ alert("who are you?"); } } // function } // function })(jQuery); $("body").foo(); $("