xAniLineAnimate an element's position over a line segment.
xAnimation.alphaArcAnimate an element's opacity and its position over an elliptical arc. This is an xAnimation method.
xAnimation.arcAnimate an element's position over an elliptical arc. This is an xAnimation method.
xAnimation.cornerAnimate an element's corner over a line segment. This is an xAnimation method.
xAnimation.cssAnimate an element's CSS property that accepts integer pixel values. This is an xAnimation method.
xAnimation.lineAnimate an element's position over a line segment. This is an xAnimation method.
xAnimation.paraAnimate an element's position over parametric equations. This is an xAnimation method.
xAnimation.rgbAnimate an element's CSS property that accepts color values. This is an xAnimation method.
xAnimation.rgbByClassAnimate a CSS property that accepts color values, for all elements with the given className. This is an xAnimation method.
xAnimation.scrollAnimate the scroll position of a window or element. This is an xAnimation method.
xAnimation.sizeAnimate an element's width and height. This is an xAnimation method.
xAnimation.sizeLinePerform a sequence of animations of an element's position and size. This is an xAnimation method.
xAnimation
Using xAnimation is easy. Create an xAnimation object and call one of the animation methods. You can then use the pause/resume methods. The other methods and properties are documented here to help you write your own animation methods. xAnimation provides an animation "engine" which supports unlimited axes of animation, multiple acceleration types and an onEnd handler. The onEnd handler can return true to cause the animation to repeat. It supports a bounce-back feature. Acceleration is implemented as an array of functions so it is easy to add custom acceleration types.
xAniRgbAnimate an element's CSS property that accepts color values.
xAniWHAnimate an element's size. This is a minimal, time-based implementation - only supports constant velocity.
xAniXYAnimate an element's position over a line segment. This is a minimal, time-based implementation - only supports constant velocity.
xEllipseAnimate an element along an elliptical path.
xParaEqParametric Equation Animation.
X(t) and Y(t) are expressions that generate the x and y coordinates during the slide. These expressions are evaluated with the javascript eval() function. Within the expression you may use any valid sub-expression that eval allows and that is in scope. For example, you may call methods of the Math object such as Math.sin(), Math.cos(), and Math.tan(). You may also reference any global variables or functions.
One variable that is within scope for your expression is the parameter t. That is, t is the argument to the equations you provide. At each iteration, the variable t increments by .008 (default value).
The Time argument to parametricEquation() specifies the total time for the slide in milliseconds. If the value is zero, the slide will not timeout. You can stop any slide, at any time, by this assignment: element.stop = true;.
The values from your expressions are plotted on a coordinate system with it's origin at the center of the sliding element's container. The coordinates are then translated by the element's container's scrollLeft and scrollTop values. So the animation will remain visible if the user scrolls or resizes the element's container.
xSequencexSequence is an experiment with time and event based sequences.
xSlideToAnimated, linear motion with sinusoidal or linear rate. Slide the element to the target position in the given time.
xWinScrollToScroll a window to a point with sinusoidal or linear rate.
xFlGetReturns a reference to a Flash object or null if not found.
xFlWriteWrite Flash HTML into the document.
xGetElementByIdGet an object reference to the element object with the passed ID.
xGetElementsByAttributeReturn an array of all sTag elements whose sAtt attribute matches sRE. sAtt can also be a property name but the property must be of type string.
xGetElementsByClassNameReturns an array of elements which are descendants of parentEle and have tagName and clsName. If parentEle is null or not present, document will be used. If tagName is null or not present, "*" will be used.
xGetElementsByTagNameReturns an array of elements which are descendants of parent and have tagName. If parent is null or not present, document will be used. If tagName is null or not present, "*" will be used.
xLoadLinkDynamically create a LINK element and append it to the HEAD.
xNextSibGet an element's next sibling which has a specific tagName.
xParentReturns the nearest ancestor of ele whose nodeName == name. Assumes name is lowercase. Omit name to get the first ancestor.
xParentNReturns e when n == 0, e.parentNode when n == 1, e.parentNode.parentNode when n == 2, etc.
xPrevSibGet an element's previous sibling.
xSmartLoadLoad script or style sheet if not loaded before.
xSmartLoad2Create any number of script or link elements and assign a URL to each.
xSmartLoadScriptMaintains an array of loaded urls to prevent the same Url being loaded twice.
xAddHandlersAssign DOM0 event handlers. For each N do: xGetElementById(idN)[ev] = fnN
xDragInFenceEnable dragging for the element. Optionally, dragging can be limited to a rectangular area. If fnDrag is not provided then this code will provide basic dragging. If fnDrag is provided then it must implement the dragging. See xEnableDrag for more info.
xEnableDragEnable dragging for the element. If fnDrag is not provided then this code will provide basic dragging. If fnDrag is provided then it must implement the dragging.
xEnableDropEnable an element to receive a drop event from any element drag-enabled with xEnableDrag.
xEventResolve browser differences for event properties. This is an object prototype. Create an instance with the 'new' operator.
xHttpRequestAn asynchronous HTTP request object. Features a 'timeout' event, an optional random parameter to prevent caching, detailed error reporting, a 'busy' property for serialization, and more.
xImgAsyncWaitAsynchronously waits (and monitors the status) of newly created or static images. Can be called before or after window.onload, or in the HTML following the last IMG element. During monitoring of image load status, your status function will be called at each iteration. After all images successfully load, your app initialization function is called. If any image fails to load, your error function is called. You can provide error and abort images for those that fail to load.
xImgRollSetupImage rollover setup. Can not be called before the window onload event. Pass image IDs starting with 4th argument. The only html requirement is for each IMG tag to have an ID. Assumes this image file naming convention:
out img = path + imgEleId + fileExt
over img = path + imgEleId + ovrSuffix + fileExt
xEachAccess each element of a collection sequentially (by its numeric index) and do something with it.
xEachEFor each ele/id, call the callback function passing it the element object and the count. Pass any number of ele/id's as arguments - the callback function must be the last argument.
xEachNIterate over all elements with the same sIdPrefix and a sequential, numeric suffix beginning with iStart. fnCallback is called for each element and passed the element, its numeric suffix and oData.
xEachUntilReturnAccess each element of a collection sequentially (by its numeric index) and do something with it. Stop when the called function returns a value.
xTimesCall a function n times.
xWalkToFirstStarts from a node and applies fnVisit up to the very first element (or up to a non-null returned value from 'fnVisit'). Children of starting node are not processed since children are consider to be "after" their parent. Optional 'data' and 'skip' work like in xWalkTree2.
xWalkToLastStarts from a node and applies 'fnVisit' up to the very last element (or up to a non-null returned value from 'fnVisit'). Children of starting node are processed since children are consider to be "after" their parent (this is the opposite to xWalkToFirst). Optional 'data' and 'skip' work like in xWalkTree2.
xWalkTreePerform a preorder traversal on the subtree starting at oNode and pass each Element node to fnVisit.
xWalkTree3Perform a preorder traversal on the subtree starting at oNode and pass each Element node to fnVisit.
xWalkULPerform a preorder traversal on nested ULs starting at oUL. If there is a nested UL it must be a direct child of the LI (not neccessarily the first). Only supports having one nested UL in each LI. The callback function is called for every LI.
xCookieSet, get or delete a cookie name/value.
xDefDetermine if all arguments are 'defined'.
xDegConverts from radians to degrees.
xInAReturn the array index of the element which is === v, else return false if v is not in a.
xLibraryThe version property of this object gives the X Library version string for the distribution in which this file was included. Each X symbol's XML file documents its own revisions. This file (xlibrary.xml) will have summary notes for each X release.
xNumDetermine if the arguments are of type Number.
xRadConverts from degrees to radians.
xRoundRounds a number to the specified number of decimal digits.
xStrDetermine if all arguments are of type 'string'.
xCardinalPositionA convient way to get the coordinates of an element's 'cardinal' (or 'compass') points.
xCenCenter an absolute-positioned element.
xCenterCenter a positioned element within the current client window space. If w,h not specified, then the existing width and height of e are used.
xGetEleAtPointReturns a reference to the element with the highest z-index which contains the given absolute point.
xHasPointDetermines if an element contains an absolute point. The element's boundary is extended (negative clip), or contracted (positive clip) by the clipping parameters.
xIntersectionDetermine if two elements intersect and if so determine the intersecting rectangle.
xLeftReturn and optionally set the element's x coordinate.
xMoveToSet the element's x and y coordinates.
xOffsetReturn an object with x and y properties giving the offset position of child relative to parent.
xPageXGet the page-relative X position of the element.
xPageYGet the page-relative Y position of the element.
xScrollLeftDetermine how far the window (or an element) has scrolled horizontally.
xScrollTopDetermine how far the window (or an element) has scrolled vertically.
xTopReturn and optionally set the element's y coordinate.
xClientHeightThe inner height of the window not including any scrollbar - that is, the "viewport".
xClientWidthThe inner width of the window not including any scrollbar - that is, the "viewport".
xClipSet the element's clipping rectangle. If ele is the only argument then set clip to existing width and height.
xColEqualizerEqualize the heights of any number of columns. Pass any number of pairs of elements to this function.
xDocSizeDetermines the (largest) width and height of the 'document'.
xHeightReturn and optionally set the element's height. It attempts to return and/or set the equivalent of offsetHeight. xHeight provides, effectively, a read/write version of offsetHeight. The border is included, as well as the padding, in the calculations. When returning the existing height, xHeight returns offsetHeight, which is the sum of the border, padding and style.height values. When setting a new height, xHeight finds the current border and padding values of the element and then subtracts those from the height you have specified before assigning the result to style.height.
xWidthReturn and optionally set the element's width. It attempts to return and/or set the equivalent of offsetWidth. xWidth provides, effectively, a read/write version of offsetWidth. The border is included, as well as the padding, in the calculations. When returning the existing width, xWidth returns offsetWidth, which is the sum of the border, padding and style.width values. When setting a new width, xWidth finds the current border and padding values of the element and then subtracts those from the width you have specified before assigning the result to style.width.
xCamelizeConverts a CSS property name string (dash-separated) to a camel-cased string (style object property name).
xCapitalizeCapitalize the first letter of every word in str.
xHexConverts an integer to a hex string.
xJoinSerialize an object. Reverse the operation with xSplit.
xPadPad a string, on the left or right, to a specific length using a specific character.
xParseColorParse a color string or number into its components.
xRgbToHexConverts three numbers (representing RGB colors) to a hex string in the form "#RRGGBB".
xSplitSplit str on delim1 then split each substring on delim2. Create an object and add properties where the property name is on the left of delim2 and its value is on the right of delim2. Reverse the operation with xJoin.
xStrReplaceEndReplaces newEnd.length characters at the end of s with newEnd.
xTrimRemoves leading and trailing white-space from a string.
xDisplayA safe wrapper for element.style.display.
xGetCSSRulesExtracts CSS rules from the style sheet object (IE vs. DOM CSS level 2).
xHasClassReturns true if an element has a specified class name
xHasStyleSelectorChecks whether any of the stylesheets attached to the document contain the definition of the specified style selector (simple string matching at the moment).
xHasStyleSheetsChecks browser support for stylesheet related objects (IE or DOM compliant).
xOpacitySet or get the opacity of an element.
xStyleSet any style property for any number of elements. If an exception is thrown, and sProp=='display', and the browser is IE7 or down, and the element is one of the table elements, then assign 'block' or 'inline' based on tagName.
xTagStyleSet any style property for any number of tags.
xTraverseStyleSheetTraverses all rules in the stylesheet, calling callback function on each rule. Recursively handles stylesheets imported with @import CSS directive. Stops when the callback function returns true (it has found what it's been looking for).
xTableThis is an unobtrusive table enhancement. It freezes the table's first row (or THEAD) and first column while the rest of the table is scrollable. If the table has a CAPTION it is removed and inserted above the frozen header.
xTableCursor2Mouseover highlight on rows and cells. Click to select a cell.
xTableHeaderFixedxTableHeaderFixed is an unobtrusive table enhancement. It makes a copy of a table's THEAD section. While the table is visible in its container the THEAD copy will be fixed to the top of the container, so you can scroll up and down in a long table and the header will always be visible. The container can be a window or a scrollable element. The position and size of the THEAD copy will be adjusted when the window is resized. The THEAD copy is clipped to its container's inner width. You only need to instantiate one xTableHeaderFixed object for each group of tables that have the same styling - and so those tables should have a common className, which you pass to the constructor. You must assign all of the table's styles relative to this className so that the THEAD copy will be styled just like it. It takes the widths of all THs (not TDs) in the THEAD and assigns them to the corresponding THs in the THEAD copy. When instantiating, you do not have to keep a reference to the object - it keeps a reference to itself, but if you plan on calling the 'init' or 'paint' methods later then you'll need to keep a reference to the object.
xTableIterateIterates thru all rows and cols of a table and calls fnCallback for each.
xTableSyncAssign a function to handle events which occur on either table and access corresponding TDs.
xCalendarxCalendar is a popup date-picker. It restricts selection to a range of Dates. Days outside the range are greyed-out. Only days in-range have a mouseover effect and can be selected. If you don't set a range it will default to the current year. When the user selects a date, a date string will be assigned to the input element you specify with the 'setInput' method. When the calendar is shown, it is positioned just to the right of this element. While displayed, the user can cancel the calendar by pressing ESCape or clicking anywhere outside the calendar. If you call xCalendar's 'show' method from a click listener then you should call xStopPropagation to prevent xCalendar from being canceled immediately.
xCollapsibleCreates a collapsible list from nested ULs or nested DIVs.
A UL/DIV is a "target" - it will have its display toggled when its
"trigger" is clicked (except for the outermost UL/DIV).
For ULs the trigger is the UL's previous sibling element.
For DIVs the trigger is also the DIV's previous sibling element,
but it must be a heading element (H1, H2, etc.).
xDialogProvides a dialog box framework.
xFensterxFenster takes an existing DIV or IFRAME element and dynamically encloses it in a draggable, resizeable "window" (fenster). If the DIV or IFRAME does not exist xFenster will create it. The constructor takes a single object as an argument. The properties of this object are documented below in the "Parameters" section.
xMenu1AxMenu1A Object Prototype. A variation on xMenu1. The menu slides down and up.
xMenu1BxMenu1B Object Prototype. A variation on xMenu1A. The menu requires a click to close and opening one closes any others that were open.
xMenu5Only one branch per level can be open. Assumes btnClass element to be a direct child of an LI, tho it doesn't have to be the first child. Assumes the btn's corresponding UL to be a sibling, tho it doesn't have to be the next sibling.
xMenu6A UL-based menu with unlimited levels and many other features.
xPersistentDisplayxPersistentDisplay provides persistent display or non-display of elements with specific CSS class names.
xPopupA DHTML alternative to popup windows.
xSelect
Accessible Categories and Sub-Categories.
xSelect is another experiment in unobtrusive DHTML. xSelect implements categories and sub-categories as two SELECT controls where the contents of the second control dynamically change depending on the selection in the main control.
In your HTML create a SELECT element (which I'll call s0) which contains OPTGROUP elements. Within each OPTGROUP are any number of OPTION elements. Given the id of s0, xSelect creates two SELECT elements: The 'main category' SELECT (s1) contains an OPTION for each OPTGROUP in s0. The 'sub-category' SELECT (s2) is dynamically filled with OPTGROUP OPTIONs depending on which category is selected in s1. s1 and s2 are dynamically created and appended to the same form which contains s0. s0 is hidden, s1 is positioned where s0 was, and s2 is positioned below or to the right of s1. If the browser doesn't support the objects required by xSelect, or if the user has javascript disabled, then the user will get the original SELECT which contains all main categories (as OPTGROUPs) and all sub-categories (as OPTIONs within each OPTGROUP).
xSplitterThis object is a nestable, dual-pane splitter. It can be horizontal or vertical. Each xSplitter has two panes. Pane1 is the left (or top) pane, and pane2 is the right (or bottom) pane. An xSplitter can be nested inside any pane of any other xSplitter. xSplitter makes no assumptions about classnames or id strings - the only requirement is that the xSplitter DIV contain 3 child DIVs in this order: pane1, pane2, and dragBar.
xTextAreaA wrapper around an html textarea allowing manipulation of its contents using normal javascript string methods.