【avalon】offsetParent】的更多相关文章

offsetParent: function () { var offsetParent = this[0].offsetParent while (offsetParent && avalon.css(offsetParent, "position") === "static") { offsetParent = offsetParent.offsetParent; } return avalon(offsetParent || root) }…
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get avalon. // F…
if (root.dataset) { avalon.fn.data = function (name, val) { name = name && camelize(name) var dataset = this[0].dataset switch (arguments.length) { case 2: dataset[name] = val return this case 1: val = dataset[name] return parseData(val) case 0: v…
This property will return null on Webkit if the element is hidden (the style.display of this element or any ancestor is "none") or if the style.position of the element itself is set to "fixed". This property will return null on Interne…
[\uD800-\uDBFF][\uDC00-\uDFFF] var rsurrogate = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g var rnoalphanumeric = /([^\#-~| |!])/g var escape = function(str) { //将字符串经过 str 转义得到适合在页面中显示的内容, 例如替换 < 为 &lt return String(str). replace(/&/g, '&'). replace…
/** * Creates a new object without a prototype. This object is useful for lookup without having to * guard against prototypically inherited properties via hasOwnProperty. * * Related micro-benchmarks: * - http://jsperf.com/object-create2 * - http://j…
<div data-a="true" data-b="false" data-d="5" data-e="null"></div> <input type="text" value="true"> <script> var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/ function parseData(…
保存原来的属性 设置成显示的属性 获取尺寸 设置回原来的属性 var cssShow = { position: "absolute", visibility: "hidden", display: "block" } var rdisplayswap = /^(none|table(?!-c[ea]).+)/ function showHidden(node, array) { //http://www.cnblogs.com/rubylouv…
jQuery简介 jQuery是一个快速.简洁的JavaScript框架,是继Prototype之后又一个优秀的JavaScript代码库(或JavaScript框架).jQuery设计的宗旨是"write Less,Do More",即倡导写更少的代码,做更多的事情.它封装JavaScript常用的功能代码,提供一种简便的JavaScript设计模式,优化HTML文档操作.事件处理.动画设计和Ajax交互. jQuery的核心特性可以总结为:具有独特的链式语法和短小清晰的多功能接口:…
源文 : http://www.oschina.net/project/tag/178/gui?lang=36&os=0&sort=view&p=1 桌面应用开发引擎 AlloyDesktop AlloyDesktop 是 HTML5 本地 App 开发引擎,是一个能将网页像软件一样运行在桌面上的app开发引擎.该引擎实现了对网页的透明渲染,使网页不再局限于浏览器的框框.同时,提供强大的 api支持,使你能轻松实现许多传统网页实现不了的功能,诸如窗口控制,文件... 更多Alloy…