摘要:
1:继承:1.1->类继承: Y.extend ,关键点:object.superclass.constructor.apply(this, arguments);继承的子类和父类之间有上下级关系,是一种严格的继承。1.2->原型继承:Y.Object(obj):注意点:子类中的方法和同名属性有优先权。2:重用:只是简单的函数属性的转移拷贝2.1->对象扩充:Y.augment(newOjb,ol... 阅读全文
摘要:
[html]test me[/html][javascript]var jQuery = $ = function(selector, context) { // jQuery 对象就是 init 函数的一个实例 return new jQuery.fn.init(selector, context);}jQuery.fn = jQuery.prototype = { i... 阅读全文
摘要:
[javascript]// Define a local copy of jQueryvar jQuery = $ = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.in... 阅读全文
摘要:
先不废话,直接代码。[html]Fire publisher:testEventStop Propagation (testEvent won't bubble to the BubbleTarget.)Prevent Default (testEvent's defaultFn won't fire.) Custom Event log messages will appear here.[/h... 阅读全文