Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Your plugin code is growing and needs to be organized. How can you implement a private method that’s unavailable to code outside your plugin?
By utilizing the plugin design pattern started in Section 12.5, private functions may be defined normally within the anonymous function that we’ve wrapped our plugin in. Because the function is enclosed in an anonymous function, outside code won’t see our private method. Code outside will only be able to see functions or methods that are attached to the jQuery object.