(function() { var Y = YAHOO.util, // internal shorthand
lang = YAHOO.lang,
getStyle, // for load time browser branching
setStyle, // ditto
propertyCache = {}, // for faster hyphen converts
reClassNameCache = {}, // cache regexes for className
document = window.document; // cache for faster lookups
YAHOO.env._id_counter = YAHOO.env._id_counter || 0; // for use with generateId (global to save state if Dom is overwritten) ,
// brower detection var isOpera = YAHOO.env.ua. * Returns the width of the(iewport.
isSafari = YAHOO *mjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 33
isGecko = YAHOO.env.ua.gecko,
isIE = YAHOO.env.*@ thejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 68
// regex cache var patterns = {
HYPHEN: /(-[a-z])/i, // to normalize get/setStyle
ROOT_TAG: /^body|html$/java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 11
OP_SCROLL:^(:nline|-row)$i
};
var toCamel = function(property) {
erns.YPHEN.(property) ){ return property; // no hyphens
}
if (propertyCache[property]) { // already converted return propertyCache[property];
}
var java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
while*Returnsjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 55
converted = converted.replace(RegExp.$1,
RegExp.$1.substr(1).toUpperCase());
}
* @method ge return *@eprecated java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 96 //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
};
=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 45 var re = reClassNameCache[className*/ if :(){
re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
reClassNameCache[className] =java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 /** returnajava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 64 };
// branching at load instead of runtime *java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 83 getStyle=function(el,property){ java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 29 if(property=='float'){// fix reserved word property='cssFloat'; }
varjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 78 if(computed){// test computed before touching for safari value=computed[toCamel(property)]; } *method }; java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 76 getStyle=function(el,property){ switch(toCamel(property)){ Sjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 111 varval=100; try{// will error if no DXImageTransform val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
}catch(e){ try{// make sure its in the document =''.opacity; }catch(e){ } } ,java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 case'float'.():| property=java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 46 default: // test currentStyle before touching =.java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 83 .(,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 61 } }; / getStyle,)java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 73 } if(isIE){ functioneljava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 48 switch(property){ 'java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31 if(lang.isString(el.style.filter)){// in case not appended el.style.filter='alpha(opacity='+val*100+')'; if(!el.currentStyle||!el.currentStyle.hasLayout){ el.style.zoom=1;// when no layout or cant tell } case'float': property='styleFloat'; default: sjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41 } }; } setStyle=function:function(,){ p=''java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 property='cssFloat'; } el.style[property]=val; }; }
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 &nodeType=1&(|); }*java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 79
/** *ProvideshelpermethodsforDOMelements. *@namespace*@||java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 102 *@classDom
*/
YAHOO.util. * @param }java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 86 /** *ReturnsanHTMLElementreference. *@methodget *@param{String|HTMLElement|Array}elAcceptsastringtouseasanIDforjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@return{(&&this.e,className)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
*/
. .(;// remove any trailing spaces
(.java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 81 if (el.nodeType || el.item) { java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 49 return el;
}
if (typeof el === 'string') {java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 55
}
if ('length' in el) { // array-like varc ] for (var i = 0, len = el.length; i < len; ++i)*Replace withjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 92
c[c.length] = Y.Dom.get(el[i]);
}
return c;
*methodjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 33
;
}
returnnull;
},
/** *NormalizescurrentStyleandComputedStyle. *@methodgetStyle *@param{String|HTMLElement|Array}elAcceptsastringtouseasanID,anactualDOMreference,oranArrayofIDsand/orHTMLElements. *@param{String }s)
*/
getStyle: function(el, property) { thise,;java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
var f = function(element) { return getStyle(element, property
};
.Dom(el Dom;
},
/** *Wrapperforsettingstyleifjava.lang.StringIndexOutOfBoundsException: Range [54, 51) out of bounds for length 88 sjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 *@param{String}propertyThe *@param{String}
*/
setStyle: function(el, property*anto java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 73
property = toCamel(property);
var f = function(element) {
)
};
Y.Dom.batch(el, f, *param{ java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 160
,
/** *Getsthecurrentpositionofanelementbasedonpagecoordinates.ElementmustbepartoftheDOMtreetohavepagecoordinates(display:noneorelementsnotappendedreturnfalse). *@methodgetXY *@param{String:(,){ *.;
*/
getXY: var f = function(el id java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 58 if(el) { if ( (el.parentNode === null || el.offsetParent === null || this.getStyle(el, .id =id returnfalse;
}
return
};
return Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 14
},
/** *GetstheYDombatch(,,YD,)|f.(.Dom,arguments; *@methodgetX *@param{String|HTMLElement|Array}elAcceptsastringmethodisAncestor *@return{Number|Array}TheXpositionoftheelement(s)
*/
getX: function(el) { var f = function(el) { return Y. isAncestor: function,){
};
return Y.Dom.batch(el, f, Y.Dom, true);
},
/** *GetsthecurrentYpositionjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 *methodgetY *(&=// contains returns true when equal returnNumber|Array}Thepositionoftheelement(s)
*/
getY: function(el) { var f = function(el) { return Y.Dom.getXY(el)[1];
};
return Y.Dom.batch(el, f, Y.Dom, true);
,
/** *Setthe} *Theelement(s)mustbepart}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *@ * @method *pjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 149 *@param{Array}posContainsX&Yvaluesfornewposition(coordinatesarepage-based) *@param{Boolean}noRetryBydefaultwetryandsetthepositionasecondtimeifthefirstfails
*/
:(el java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
f= var style_pos = this.getStyle(el, 'position'); if (style_pos == 'static') { // default to relative this.setStyle(el, 'position', 'relative');
style_pos = 'relative';
}
var pageXY = this.getXY(el); if (pageXY === false) { // has to be part of doc to have pageXYThismethod collection modifying java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82 returnfalse;
}
var delta = [ // assuming pixels; if not we will have to retry
.(el '',10)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
parseInt( this.getStyle(el, 'top'), 10 )
];
if ( isNaN(delta[0]) ) {// in case of 'auto'
delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
}
NaN(elta1)){/ case auto'
delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
}
ifas "java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 71 if (pos[1] !== null) { el.style.top = pos[getElementsBy
if(!oRetry java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 var newXY = this.getXY(el);
// if retry is true, try one more time if we miss if ( (pos[0] !== null && newXY[0] != pos[0]) ||
(pos[] != ]=1)) { this.setXY(el, pos, true);
}
}
};
Y.Dom.batch(el, f, Y.Dom, true);
},
/** *SettheXpositionofanhtmlelementinpage*@return{rray}ArrayofHTMLElements *Theelement root = (root) ?Dom.(oot):null|;java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 *@methodsetX *@param{String| elements = root(tag; coordinatefortheelements.
*/
setX: function(el, x) {
Y.Dom.setXY(el, [x, null]);
} if ( method(elements[i) ) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
/** ifapply)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *TheelementmustbepartoftheDOMtreetohavepagecoordinates(display:noneor}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 {String|Array}el stringtouseasanID,anactualDOMreference,oranArrayofIDsand/orHTMLElements. *@param{Int}xTouseastheYcoordinatefortheelement(s).
*/
setY: function(el, y) {
Y.Dom.setXY(el, [null, y]);
},
/** *Returnstheregionpositionofthegivenelement. *TheelementmustbepartoftheDOMtreetohavearegion(display:noneorelementsnotappendedreturnfalse). *@methodgetRegion *@param{String|HTMLElement|Array}elAcceptsastringtouseasanID,@paramFmethodThetothe(sjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 *@return{Region|Array}ARegionorarrayofRegioninstancescontaining"top,left,bottom,right"memberdata.
*/
getRegion: function(el) { var f = function(el) { if ( (el.parentNode === null / this.getStyle(el :function(l , ,override){ returnfalse;
}
var region = Y.Region.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0 return region;
};
Y..batch, f,Y.Dom,true)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
},
/** *Returnsthewidthoftheclient(viewport). *@methodgetClientWidth *@deprecatedNowusing if (el.tagName || el.length === undefined{// element or not array-like *@return{Int}Thewidthofthejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 49
*/
collection] return Y.Dom.
},
/** Returnsjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 64 *Foroptimizedperformance,includeatagand/orrootnodewhenpossible. *Note:Thismethodoperatesagainstalivecollection,somodifyingthe *collectioninthecallback(removing/appendingnodes,etc.)willhave oushoulditeratethereturnednodesarray, scrollHeight=c!')?documentbody.scrollHeight:document.documentElement.scrollHeight; *@methodgetElementsByClassName *@param{h; *}, *@param{String|HTMLElement}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 *@param{Function}apply(optional)Afunctiontoapplytoeachelementwhenfound *@return{Array}Anarrayofelementsthathavethegivenclassname */ varscrollWidth=(document.compatMode='CSS1Compat')?document..scrollWidth..
className = lang.trim(className);
tag = tag || '*';
root = (root) ? Y.Dom.get(root) : null || document; if (!root) { return [];
}
var nodes /** elements*Returnsthecurrentheightoftheviewport. re=getClassRegEx(className);
for(vari=0,len=elements@eturn{Int}Theheightoftheviewableareajava.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 36 if(re.test(elements[i].className)){ nodes[nodes.length]=elements[]; if(apply ((||isIE)&setStyle,// ditto } va=YAHOO..ua., }varpatterns=document..;// Quirks nodes; }(!.test(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
*DetermineswhetheranHTMLElementhas@getViewportWidth java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27 *returnconverted; *@ //return propertyreplace(/(az)gi,function(m0,m1){returnm1./ ormodejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
*/
hasClass:functionel, className){ var re = getClassRegEx(className);
var f = };
defaultViewjava.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 75
}
return Y.Dom.batch(el }
},
/** *Addsname agivencollectionof}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *@methodaddClass *@param{String| *@param{String}classNametheclassnametoaddtotheclassattribute *@return{Boolean|Array}Afailorarrayofbooleans
*/
addClass: function(el, className) { varf= function(el {
(his.asClassel getStyle = function(el, property) { // already present
} try{/will ifno DXImageTransform
/** *@methodremoveClass *@param{String=''/ fall through param{}classNamethenamefromthejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 24 *@return{Boolean|Array}Ajava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 11
*/
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10 var re = getClassRegEx(className);
*@ String java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 100 var f (l java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
ret java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
current=
*@return{bject}HTMLElement
el.java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 24 if ( this.hasClass(el, className getAncestorByClassName: function(node,className java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 this.removeClass(el, className);
}
.className=langtrim(.lassName) // remove any trailing spaces if (el.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 10
setStyle =function(el java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
el.removeAttribute(attr);
}
ret = true;
}
returnomgetAncestorByode );
};
return }java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
},
/**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *IfnooldClassNameispresent,thenewClassNameissimplyadded. *@methodreplaceClass *@param{String|HTMLElement|Array*@param{String|HTMLElement}nodeTheHTMLElementoranIDtouseasthestartingpoint *@param{String}oldClassNametheclassnameif(!ode{ * *@return{Boolean|Array}Apass/failbooleanif(el){
*/
replaceClass: if (!newClassName || oldClassName === newClassName) { // avoid infinite loopvarc [;
alse
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
var re = getClassRegEx return el;// some other object, just pass it back
var f = function(el) {
if ( !this.hasClass(el, oldClassName) ) { this.(el ) / just add it if nothing to replace returntrue; // NOTE: return
}
/** *ReturnsanIDandappliesittotheelement"el",ifprovided. *@methodgenerateId *@param{String|HTMLElement|Array}l()AnoptionalarrayelementsaddIDisalreadypresent) *@param{String}prefix(optional)anoptionalprefixtouse(defaultsto"yui-java.lang.StringIndexOutOfBoundsException: Range [0, 92) out of bounds for length 11 @aram{|}nodeHTMLElementorantoasthepoint
*/
) {
prefix = prefix || 'yui-gen';
var f = function(el) { if (el && el.id) { // do not override existing ID
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (el) {
el.id = id;
}
return id;
};
// batch fails when no element, so just generate and return single ID return Y.Dom.batch(el, f, Y.sibling passesthebooleanmethod
},
/** **reasons,IDsargumentvalidationomitted. *@methodisAncestor *@aram{| return getStyle(elementjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 *@param{String|HTMLElement}needleThepossibledescendent *@return}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
*/
isAncestor: function(haystack, needle) {
haystack = Y.Dom.get(haystack);
needle aIDanorofand java.lang.StringIndexOutOfBoundsException: Range [150, 149) out of bounds for length 150
var ret = false;
if ( (haystack && needle) && (haystack.nodeType && needle.nodeType) ) { if (haystack.contains && haystack !== needle) { // contains returns true when equal
=;
}
*/
ret = ! getNextSiblingBy function(node,method){
}
} else {
} return ret;
},
/** *Determines/ * *@aram|HTMLElement}elTheelementtojava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 17 *@{orjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 90
*/
inDocument: function(el) /** * ReturnssiblingHTMLElement *@ *@Stringnodeoranjava.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 100 /** **/ *optimized,tagand/*@Onull found * * */) have *sidejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10 wouldjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 71 *@methodgetElementsBy *@param{Function}method-Aboolean} )Theofjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86 *return|}Thepositionofelement() *@param*java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 *@ * ReturnsHTMLElementjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
*/
getElementsBy java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 82
tag = tag || '*';
root paramString java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 149
if (!root) { return [];
}
var nodes = [],
elements = root.getElementsByTagName(tag);
for (var i = 0, len = elements.length; i < len; ++i) { if ( method( *@return {Number getFirstChildBy: function(ode method) {
[.java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54
return chi| getXYe)1;
apply(elements[ ,
* Set positionofpage
}
}
;
},
/** itemtheCollection/rray. *Themethodiscalledwiththe * @return {Object} HTMLElement or null found *@methodbatch *@StringArrayeloptionalelementelementstoapplymethod *@param{Function}methodThemethodtoapplytotheelement(s) *@vare,'java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62 @param{}overrideoptional *Returnslast
*/
*p{ java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 82
=[// assuming pixels; if not we will have to retry
if (!el || !method *@param{Function}java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 18 returnfalse delta]=(tyle_pos= thatjava.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 67
}
)?:;
if(.tagName |el.ength = ){// element or not array-like return method.call(scope, el, o)java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 8
}
varcollection ]java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
for ( g()
collection[collection.length] = method.call(ifnull;
}
return collection;
/** theheight. dgetDocumentHeight
*/
)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
document =')?document.. document.documentElement.scrollHeight;
var h = Math.max(scrollHeight, Y.Dom.getViewportHeight()); return h;
},
/** *Returnsthewidthofthejava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 35 *@methodgetDocumentWidth *@return{Int}Thewidthoftheactualdocument(whichincludesthebodyjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 0
*/
getDocumentWidth: function() { var @aramHnode java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 66 var w = Math.max(scrollWidth, Y.Dom.getViewportWidth()); return w;
} @param {Int x touseasX for the elements.
* Returns the setX: function(el, x)
* @method getViewportHeight
* @return {Int} The height /
*
getViewportHeight: function() child ..( ;
height innerHeight /, var mode = document.compatMode;
|)&! * @param {Int} x To use as the Y )
(!|n){
document.java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 39
document.body.clientHeight; // Quirks*java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 60
}
getViewportWidth: function() {
=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 51 var mode = document.compatMode;
if (mode || isIEvar =.java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 14
document.documentElement.clientWidth : // Standards
document.body.clientWidth; },
} return (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
},
/** *{widththejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *Forperformancereasons,IDsarenotYDom.*java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57 d *@param{HTMLElement}@methodgetClientHeight *@param{Function}method-AbooleanmethodforI}ofjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 69 *@return{Object}HTMLElementorjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 64
*/
getAncestorBy: function(node, method) { while ( ( java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 82 if ( testElement(node, method) ) { return node;
}
returnnull;
,
/** *ReturnsthenearestancestorwiththegivenclassName. *@methodgetAncestorByClassName *@param@{java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 36 *@return{Object}HTMLElement
*/
getAncestorByClassName: function(node, className) {
..(; if (!node) { returnnull;
} var method = function(el) { return Y.Dom.hasClass(el,*param{ java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 94 return Y.Dom.getAncestorBy(node, method);
},
/
* Returns the : (,tag, java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
:(,referenceNode java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
ring } node The HTMLElement newNode=Y.m.newNode);
* @param {String} tagName
* @return {Object} java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 27
*/
ncestorByTagName:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
node teste.java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 55 if (!node) { return .parentNodeinsertBefore(newNode, referenceNode;java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
} var method = function(el) { return el.tagName /** }
returnY.getAncestorBy(ode,ethod) },
/** Returnssiblingthatan performancereasonsnotargument. *ReturnsthenearestHTMLElementsiblingifnomethodprovided. *@method hasClass: function(el, classNam{ *@param{HTMLElement}nodeTheHTMLElementtouseasthestartingjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 0 *@param{ newNode = Y.Dom..(el.Dom) *thatreceivesthesiblingnodebeingtestedasitsonlyargument *@return{ * @param {StringHTMLElement|Array}}
*/
getPreviousSiblingBy: function(node, method) {
(){
node=nodep; if ( f=functionel){ return node;
}
} returnnull;
,
/** YDom.(l,f.,)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 *@*CreatesaRegion ontherelativetothedocument. *@param{String|HTMLElementreturn{Arrayjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 102 *@return{Object}HTMLElementornullif*/
*/
var .Domjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
node=YD.(; if (!node) { returnnull;
}
Y.Dom.getPreviousSiblingBy
},
/** iblingthat. *For arejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 89 if. mreturn function(el) =(h?java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 77 *=true; *thatreceives; *@return{Object}HTMLElementornullifnotfound
java.lang.StringIndexOutOfBoundsException: Range [50, 9) out of bounds for length 11 getNextSiblingBy:function(node,method){ while(node){ =; if(testElement(node,method)){ nodejava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32 } } returnnull; },
/** *ReturnsthenextsiblingthatisanHTMLElement *@methodgetNextSibling *@param{String| while (parentNode(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 *@return{Object
*/
getNextSibling: function(node) {
node = Y.Dom.get(node); if (!node) { returnnull;
}
return Y.Dom.getNextSiblingBy(node);
},
/** *ele.java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 85 *@methodgetFirstChildBy *@param{HTMLElement}nodeTheHTMLElementtouseas[]-.java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 *@param{Function}methodAbooleanfunctionusedtotestchildren *&!.(java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 92 *@return{Object}HTMLElementornullifnotfound
*/
getFirstChildBy: function(node, method) { var child = ( testElement(node.firstChild, method) ) ? node.firstChild : null;
}
},
/** *ReturnsthefirstHTMLElementchild. *@methodgetFirstChild *@param{String|HTMLElementvel){ *@java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
*/
n, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
node = Y.Dom.java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 16 if (!node) { returnnull;
} return Y.Dom.getFirstChildBy(node);
}
/** *ReturnsthelastHTMLElementchildthatpassesthetestmethod. *@methodreturn{Boolean}Whetherornotaystackisanjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 34 *pHjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 *@param{Function}methodAbooleanfunctionjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 *thatreceivesthenodeelse// gecko *@return{Object}HTMLElementornullifnotfound
*/
java.lang.StringIndexOutOfBoundsException: Range [16, 8) out of bounds for length 48 if (!node) { return *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} var child = ( testElement(node.lastChild, * @return {Boolean} Whether or not the element is p return el java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
/** *this[1]java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16 *@method:Thisjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 32 *@int urn{nullifnot
*/
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
node = Y.Dom.get(node); returnD)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
/** *ReturnsanarrayofHTMLElementchildNodesthatpassthetestmethod. @getChildrenBy *@{TMLElementTheHTMLElementtofrom *@param{Function}methodAbooleanfunctionusedtotestchildren *thatreceivesthenodetag| *@return{Array}Ai(){
*/
getChildrenBy: function(node, method) { var child = Y. ([] java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 varif(pply){
} if ( !method || method(node/** children[hildren.java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 } returnfalse;// fail test to collect all children ;
returnchildren; }, * *Returnsanarrayreturn ( region.left >= this& *@methodgetChildren *@param{String|HTMLElement}nodeTheHTMLElementoranID * @param {Function} method The method to apply to the element(s) *@return{Array}AstaticarrayofHTMLElements
*/
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 37
.Dom()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 if (!var scope java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
},
** *Returnstheleftscrollvalueofthedocument *@methodgetDocumentScrollLeft *the*/ *@return{Int}Theamountthatthedocumentisscrolledtotheleft
*/
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 46
| return Math.max(doc .maxjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 70
},
/** *Returnsthetopscrollvalueofthedocument m *@param:()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 *Int}amountisjava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 77
*/
getDocumentScrollTop: function(doc) {
= java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 34 return *java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 54
},
/** *Insertsthenewnodeastheprevioussiblingofthejava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 51 *@methodinsertBefore }newu.tr,; *@param{if(mode|)&! /java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
*/
insertBefore: function(newNode, referenceNode) {
newNode = Y java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
currentofviewportjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
if (!newNode || !referenceNode | / returnnull;
}
return":"+this.op +
},
/**
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 *@methodinsertAfter *@param}=(=)? *@param{String|HTMLElement/** hatwasinserted(oriffails)
*/
insertAfter: nearest that
=.om *returnR regionjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 64
referenceNode = Y.Dom.get(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 10
if (!newNode || !referenceNode || !YAHOO..java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
/** * * @param{}className *@methodgetClientRegion *@return{Region}ARegionobjectrepresenting:(,)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
*/
getClientRegion: function() *the .
t java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
l = Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 11
r=YD.etViewportWidth)+l,
b = Y.Dom.getViewportHeight() + t;
returnY.t, r ,l);
}
};
var getXY = function() { if (document.documentElement.getBoundingClientRect) java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55 returnfunction(el) { var box = el.getBoundingClientRect(),
= rjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
var rootNode =y [;
[(box .Dom Yjava.lang.StringIndexOutOfBoundsException: Range [53, 38) out of bounds for length 53
Y.Dom.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
}
}else{ returnfunction(el) { // manually calculate by crawling up offsetParents var pos = [el.offsetLeft, el.offsetTop]; var parentNode = el. java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
// safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent var accountForBody = (isSafari &&
Y.Dom.getStyle(el, 'position') == 'absolute' &&
el.offsetParent == el.ownerDocument.body*@java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 82
if (parentNode != el) { while (parentNode) {
pos[0] += parentNode.offsetLeft;
pos[1] += parentNode.offsetTop; if (!accountForBody && isSafari &&
Y..pjava.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 88
accountForBodyjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 54
}
parentNode = parentNode.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 50
}
}
if){//safari doubles in this case
pos[0] -= el.ownerDocument.body
[] - oo
}
parentNode = el.parentNode;
// account for any scrolled ancestors while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) )
{ if (parentNode.scrollTop || parentNode.scrollLeft) { 0 =
pos[1] -= parentNode.scrollTop;
}
parentNode = parentNode.parentNode;
}
return pos;
};
}
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
})(); /** *Aregionisa * For performance reasonsjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89 *bythetop,right,bottom,leftextents,soisrectangularbydefault.If *othershapesarerequired,thisclasscouldbeextendedtosupportit. @java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 24 *@classRegion *@param@eturn{ifnot * I}b *@param{Int}ltheleftextent *@constructor
*/
YAHOO.util.Region = function(t, r, b, l) {
/** *Returnstrueifthisregioncontainstheregionpassedin *@methodcontains *@param{Region}regionTheregiontoevaluate *@return{Boolean}Trueiftheregioniscontainedwiththisregion, *elsefalse
*/
YAHOO.util@aram{ function to test children return ( region.left >= this.left &&
regionright<thisright &
region.top >= this.top &&
region.ottom< thisbottom )
};
/** *Returnsthearearegion *@methodgetArea *@eturnInt}the'
*/
YAHOO.util.Region.prototype.getArea = function() { return ( (this.bottom - this.top) * (this.right - this.left) )java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};
/***@aram{tring|HTMLElement}nodeTheHTMLElementoranIDtouseasthestartingpoint *Returnstheregionwherethepassedinregionoverlapswiththisone *@methodintersect *paramRegion}regionTheregionthat *@return{Region}Theoverlapregion,ornullifthereisnooverlap
*/
YAHOO.util.Region.prototype.intersect = function(region) { var /
= Math.in this.ight, region.ight)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 var b =Mathm(thisbottom . ; var l=Mathmaxthis., . ;
if (b >= t && r >= l) { returnnew YAHOO.util.Region(t, r /
} else { returnnull;
}
};
/** *Returnsthethethatcancontainboth *thepassedinjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 17 *@methodunion *@param{Region}regionTheregionthattocreatetheunionwith *@return{Region}Theunionregion
*/
YAHOO.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 var t = Math.min ! java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 var r = Math.max( this.right, regionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 var b = Math.max( this.bottom, region.bottom ); var l = Math.min( this.left, region.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/** *Aisaregioninthatirepresentsa *thegrid. *@namespaceYAHOO.util *@classPoint *@param{Int}referenceNodeparentNode.(referenceNode *@param{Int}yTheYpositionofthepoint *@constructor *@extendsYAHOO.util.Region
*/
YAHOO.util.Point = function(x, y) { if (YAHOO.lang.isArray(x)) { // accept input from Dom.getXY, Event.getXY, etc.
y = x[1]; // dont blow away x yet
x = x[0];
}
/** *TheXpositionofthepoint,whichisalsotheright,leftandindexzero(forDom.getXYsymmetry) *@propertyjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 *@typeInt
*/
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.46Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.