jQuery Plugin Namespacing Functions

后端 未结 4 856
-上瘾入骨i
-上瘾入骨i 2021-02-04 15:20

I\'m creating a jQuery plugin that that is rather large in scope. In fact, the plugin technically consists of a few plugins that all work together.

(function($){         


        
4条回答
  •  难免孤独
    2021-02-04 16:13

    Well, I'm sure there are many ways to skin this cat. The jQuery UI library uses a pattern like this:

    // initialize a dialog window from an element:
    $('#selector').dialog({});
    
    // call the show method of a dialog:
    $('#selector').dialog('show');
    

提交回复
热议问题