- /**
- * 扩展 jQuery EasyUI 插件模版
- *
- * http://bbs.btboys.com
- */
- (function ($) {
-
- function init(target) {
- var opt = $.data(target, "_pluginName_").options;
-
-
- }
-
- $.fn._pluginName_ = function (options, params) {
- if (typeof options === 'string') {
- return $(this)._pluginName_.methods[options].call(this,params);
- }
-
- options = options || {};
- return this.each(function () {
- var opt = $.data(this, "_pluginName_");
- if (opt) {
- $.extend(opt.options, options);
- } else {
- $.data(this, "_pluginName_", {
- options : $.extend({}, $.fn._pluginName_.defaults, options,$.fn._pluginName_.parseOptions(this))
- });
- init(this);
- }
- });
- };
-
- $.fn._pluginName_.methods = {
- options : function () {
- return this.data()._pluginName_.options;
- }
- };
-
- $.fn._pluginName_.parseOptions=function(target){
- var jq = $(target);
- return {
- id:jq.attr("id")
- };
- };
-
- $.fn._pluginName_.defaults = {
-
- };
-
- if ($.parser) {
- $.parser.plugins.push('_pluginName_');
- }
- })(jQuery);