Access private members of jQuery plugin

后端 未结 3 836
南方客
南方客 2020-12-19 08:19

jQuery plugins use a pattern like this to hide private functions of a plugin:

(function ($) {
    var a_private_function = function (opts) {
        opts.onS         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 08:40

    As I learned in this answer, the only way to access the private members of a jQuery plugin are to modify the plugin source itself.

提交回复
热议问题