惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
腾讯CDC
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
博客园 - 司徒正美
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
Vercel News
Vercel News
爱范儿
爱范儿
Last Week in AI
Last Week in AI
G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园_首页
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
V
V2EX
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理

博客园 - Leon0812

Export csv Export Excel XML Mail Template Management Resource file management Excel Reader iframe 中显示内嵌页的局部 - Leon0812 - 博客园 easyslider - Leon0812 - 博客园 缩放页面字体 可编辑DIV - Leon0812 - 博客园 vs快捷键大全(转) SQL文件執行 利用IHttpModule、IHttpHandler做授权类 - Leon0812 - 博客园 C#调用非托管的DLL 无缝滚动 - Leon0812 - 博客园 获取-编译-打包 VS作业一条龙批处理 Reporting Service for SQL 2008匿名访问报表方法 獲取控件位置 - Leon0812 - 博客园 Installscript中修改web.config - Leon0812 - 博客园 publish
Jquery pluign development example
Leon0812 · 2011-09-01 · via 博客园 - Leon0812
(function($){

$.fn.ChangeStyle

= function(options,msg){var opts = $.extend({},$.fn.ChangeStyle.defaults, options); this.css("background",opts.background);
this.css("color",opts.color); //private method
Note(msg);//public method
$.fn.ChangeStyle.customAction();

};

function Note(msg)
{
if(undefined != msg)
{
alert(msg);
}
}

$.fn.ChangeStyle.defaults

= { background:"#999",color:"red"};

$.fn.ChangeStyle.customAction

= function(){};

})(jQuery);

//Invoke the pluign example
$(

function()
{

//set properties
//$(

"form").ChangeStyle.defaults.background = "#f1f1f1";
//$(
"form").ChangeStyle.defaults.color = "blue";

$(

"form").ChangeStyle.customAction = function(){ alert("this is custom action")};
$(
"form").ChangeStyle({ background:"#999",color:"red"},"hi");

});