jQuerySharp 介绍
jQuerySharp 是一个用 C# 来编写 jQuery 代码的C#类库,下面是生成的 jQuery 代码示例:
Type.createNamespace(‘JQuerySharp’);
////////////////////////////////////////////////////////////////////////////////
// JQuerySharp.Example
JQuerySharp.Example = function JQuerySharp_Example() {
}
JQuerySharp.Example.prototype = {
run: function JQuerySharp_Example$run() {
var jq = jQuery(‘#test’);
jq.append(‘Some new content’).append(‘A bit more’);
jq.attr(‘style’, ‘border:1px’);
if (jQuery.browser.msie) {
alert(‘You're using IE’);
}
jQuery(‘#clickme’).click(Delegate.create(this, this.onClick));
jQuery().ready(Delegate.create(this, this.onReady));
},
onClick: function JQuerySharp_Example$onClick() {
jQuery(‘#newcontent’).html(‘
new stuff here
‘);var test = jQuery(‘#cloneme’).clone();
var jq = jQuery(‘#newcontent’);
jq.attr(‘style’, ‘color:red’).append(‘
This comes from attr
‘);jq.append(test);
},
onReady: function JQuerySharp_Example$onReady() {
alert(‘Called from ready’);
var plugin = jQuery(‘#test’);
plugin.accordion();
}
}
JQuerySharp.Example.createClass(‘JQuerySharp.Example’);
jQuerySharp 官网
http://code.google.com/p/jquerysharp/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。