Skip to content

插件

基本写法

see doc

;(function ($) {
  $.fn.pluginname = function (options) {
    var opts = $.extend({}, $.fn.pluginname.defaults, options)
    // do something
  }
  $.fn.pluginname.defaults = {}
})(jQuery)