2014年4月8日
摘要: 选到元素后的处理利用this.pushStack()方法对元素进行处理:1、将找到的元素push到数组ret中,并把ret通过工具函数jQuery.merge()合并到新jquery对象中,并赋给ret。2、对ret添加属性prevObject .end()方法可以返回prevObject属性值3、对ret添加属性context给选择到的元素添加selector属性 阅读全文
posted @ 2014-04-08 16:26 challengeself 阅读(100) 评论(0) 推荐(0)
摘要: setDocument源码解释:/*** Sets document-related variables once based on the current document* @param {Element|Object} [doc] An element or document object to use to set the document* @returns {Object} Returns the current document*/根据参数中给定element或document object来设置documetn,最后返回document用到的一些element或document 阅读全文
posted @ 2014-04-08 15:13 challengeself 阅读(145) 评论(0) 推荐(0)