flymis/WebRoot/dojojs/src/html/display.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.html.display");
dojo.require("dojo.html.style");
dojo.html._toggle = function(node, tester, setter){
node = dojo.byId(node);
setter(node, !tester(node));
return tester(node);
}
dojo.html.show = function(/* HTMLElement */node){
// summary
// Show the passed element by reverting display property set by dojo.html.hide
node = dojo.byId(node);
if(dojo.html.getStyleProperty(node, 'display')=='none'){
dojo.html.setStyle(node, 'display', (node.dojoDisplayCache||''));
node.dojoDisplayCache = undefined; // cannot use delete on a node in IE6
}
}
dojo.html.hide = function(/* HTMLElement */node){
// summary
// Hide the passed element by setting display:none
node = dojo.byId(node);
if(typeof node["dojoDisplayCache"] == "undefined"){ // it could == '', so we cannot say !node.dojoDisplayCount
var d = dojo.html.getStyleProperty(node, 'display')
if(d!='none'){
node.dojoDisplayCache = d;
}
}
dojo.html.setStyle(node, 'display', 'none');
}
dojo.html.setShowing = function(/* HTMLElement */node, /* boolean? */showing){
// summary
// Calls show() if showing is true, hide() otherwise
dojo.html[(showing ? 'show' : 'hide')](node);
}
dojo.html.isShowing = function(/* HTMLElement */node){
// summary
// Returns whether the element is displayed or not.
// FIXME: returns true if node is bad, isHidden would be easier to make correct
return (dojo.html.getStyleProperty(node, 'display') != 'none'); // boolean
}
dojo.html.toggleShowing = function(/* HTMLElement */node){
// summary
// Call setShowing() on node with the complement of isShowing(), then return the new value of isShowing()
return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); // boolean
}
后面还有 136 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。