X Library Viewer

Download the X Distribution File.

X Short Index

Animation

xAniLine, xAnimation.alphaArc, xAnimation.arc, xAnimation.corner, xAnimation.css, xAnimation.imgSize, xAnimation.line, xAnimation.opacity, xAnimation.para, xAnimation.rgb, xAnimation.rgbByClass, xAnimation.scroll, xAnimation.size, xAnimation.sizeLine, xAnimation, xAniOpacity, xAniRgb, xAniWH, xAniXY, xEllipse, xParaEq, xSequence, xSlideCornerTo, xSlideTo, xWinScrollTo.

DOM

xFirstChild, xFlGet, xFlWrite, xGetElementById, xGetElementsByAttribute, xGetElementsByClassName, xGetElementsByTagName, xLoadLink, xLoadScript, xNextSib, xParent, xParentN, xPrevSib, xSmartLoad, xSmartLoad2, xSmartLoadScript.

Debug

xConsole, xEditable, xName, xParentChain, xSetIETitle.

Event

xAddEventListener, xAddHandlers, xDragInFence, xEnableDrag, xEnableDrop, xEvent, xHttpRequest, xPreventDefault, xRemoveEventListener, xStopPropagation.

Image

xImgAsyncWait, xImgRollSetup, xTriStateImage.

Iteration

xEach, xEachE, xEachN, xEachUntilReturn, xTimes, xWalkToFirst, xWalkToLast, xWalkTree, xWalkTree2, xWalkTree3, xWalkTreeRev, xWalkUL.

Misc

xCookie, xDef, xDeg, xGetURLArguments, xInA, xLibrary, xLinearScale, xNum, xRad, xRound, xStr.

Position

xCardinalPosition, xCen, xCenter, xGetEleAtPoint, xHasPoint, xIntersection, xLeft, xMoveTo, xOffset, xPageX, xPageY, xScrollLeft, xScrollTop, xTop.

Size

xClientHeight, xClientWidth, xClip, xColEqualizer, xDocSize, xHeight, xResizeTo, xWidth.

String

xCamelize, xCapitalize, xHex, xJoin, xPad, xParseColor, xRgbToHex, xSplit, xStrEndsWith, xStrRepeat, xStrReplaceEnd, xStrStartsWith, xTrim.

Style

xAddClass, xDisplay, xFindAfterByClassName, xFindBeforeByClassName, xGetComputedStyle, xGetCSSRules, xGetStyleSheetFromLink, xHasClass, xHasStyleSelector, xHasStyleSheets, xInsertRule, xOpacity, xRemoveClass, xStyle, xTagStyle, xToggleClass, xTraverseDocumentStyleSheets, xTraverseStyleSheet.

Table

xTable, xTableCellVisibility, xTableColDisplay, xTableCursor, xTableCursor2, xTableHeaderFixed, xTableIterate, xTableRowDisplay, xTableSync.

UI

xBar, xCalendar, xCollapsible, xDialog, xFenster, xMenu1, xMenu1A, xMenu1B, xMenu5, xMenu6, xModalDialog, xPersistentDisplay, xPopup, xSelect, xSplitter, xTabPanelGroup, xTextArea, xTooltipGroup.

Window

xWinClass, xWindow, xWinOpen.

X Long Index

Animation

xAniLine
Animate an element's position over a line segment.
xAnimation.alphaArc
Animate an element's opacity and its position over an elliptical arc. This is an xAnimation method.
xAnimation.arc
Animate an element's position over an elliptical arc. This is an xAnimation method.
xAnimation.corner
Animate an element's corner over a line segment. This is an xAnimation method.
xAnimation.css
Animate an element's CSS property that accepts integer pixel values. This is an xAnimation method.
xAnimation.imgSize
Animate an image's width and height. This is an xAnimation method.
xAnimation.line
Animate an element's position over a line segment. This is an xAnimation method.
xAnimation.opacity
Animate an element's opacity. This is an xAnimation method.
xAnimation.para
Animate an element's position over parametric equations. This is an xAnimation method.
xAnimation.rgb
Animate an element's CSS property that accepts color values. This is an xAnimation method.
xAnimation.rgbByClass
Animate a CSS property that accepts color values, for all elements with the given className. This is an xAnimation method.
xAnimation.scroll
Animate the scroll position of a window or element. This is an xAnimation method.
xAnimation.size
Animate an element's width and height. This is an xAnimation method.
xAnimation.sizeLine
Perform 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.
xAniOpacity
Animate an element's opacity.
xAniRgb
Animate an element's CSS property that accepts color values.
xAniWH
Animate an element's size. This is a minimal, time-based implementation - only supports constant velocity.
xAniXY
Animate an element's position over a line segment. This is a minimal, time-based implementation - only supports constant velocity.
xEllipse
Animate an element along an elliptical path.
xParaEq
Parametric 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.
xSequence
xSequence is an experiment with time and event based sequences.
xSlideCornerTo
Time-based resize (corner slide) with sinusoidal rate.
xSlideTo
Animated, linear motion with sinusoidal or linear rate. Slide the element to the target position in the given time.
xWinScrollTo
Scroll a window to a point with sinusoidal or linear rate.

DOM

xFirstChild
An enhanced wrapper for element.firstChild.
xFlGet
Returns a reference to a Flash object or null if not found.
xFlWrite
Write Flash HTML into the document.
xGetElementById
Get an object reference to the element object with the passed ID.
xGetElementsByAttribute
Return 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.
xGetElementsByClassName
Returns 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.
xGetElementsByTagName
Returns 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.
xLoadLink
Dynamically create a LINK element and append it to the HEAD.
xLoadScript
Dynamically load a js file.
xNextSib
Get an element's next sibling which has a specific tagName.
xParent
Returns the nearest ancestor of ele whose nodeName == name. Assumes name is lowercase. Omit name to get the first ancestor.
xParentN
Returns e when n == 0, e.parentNode when n == 1, e.parentNode.parentNode when n == 2, etc.
xPrevSib
Get an element's previous sibling.
xSmartLoad
Load script or style sheet if not loaded before.
xSmartLoad2
Create any number of script or link elements and assign a URL to each.
xSmartLoadScript
Maintains an array of loaded urls to prevent the same Url being loaded twice.

Debug

xConsole
A debugging utility.
xEditable
A simple function to allow in-line editing.
xName
Debugging utility.
xParentChain
Walks up the parent chain building a string suitable for displaying.
xSetIETitle
Debugging utility for running multiple versions of IE. Prepend browser version to document title.

Event

xAddEventListener
Register an event listener on the element.
xAddHandlers
Assign DOM0 event handlers. For each N do: xGetElementById(idN)[ev] = fnN
xDragInFence
Enable 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.
xEnableDrag
Enable 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.
xEnableDrop
Enable an element to receive a drop event from any element drag-enabled with xEnableDrag.
xEvent
Resolve browser differences for event properties. This is an object prototype. Create an instance with the 'new' operator.
xHttpRequest
An 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.
xPreventDefault
A cross-browser wrapper for event.preventDefault
xRemoveEventListener
Unregister an event listener previously registered with xAddEventListener.
xStopPropagation
A cross-browser wrapper for event.stopPropagation

Image

xImgAsyncWait
Asynchronously 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.
xImgRollSetup
Image 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
xTriStateImage
Image rollover with a third state - mousedown.

Iteration

xEach
Access each element of a collection sequentially (by its numeric index) and do something with it.
xEachE
For 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.
xEachN
Iterate 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.
xEachUntilReturn
Access each element of a collection sequentially (by its numeric index) and do something with it. Stop when the called function returns a value.
xTimes
Call a function n times.
xWalkToFirst
Starts 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.
xWalkToLast
Starts 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.
xWalkTree
Perform a preorder traversal on the subtree starting at oNode and pass each Element node to fnVisit.
xWalkTree2
Traverse a sub-tree.
xWalkTree3
Perform a preorder traversal on the subtree starting at oNode and pass each Element node to fnVisit.
xWalkTreeRev
Traverse a sub-tree in reverse.
xWalkUL
Perform 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.

Misc

xCookie
Set, get or delete a cookie name/value.
xDef
Determine if all arguments are 'defined'.
xDeg
Converts from radians to degrees.
xGetURLArguments
Parses the name/value pairs on the url.
xInA
Return the array index of the element which is === v, else return false if v is not in a.
xLibrary
The 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.
xLinearScale
Get a scaled value
xNum
Determine if the arguments are of type Number.
xRad
Converts from degrees to radians.
xRound
Rounds a number to the specified number of decimal digits.
xStr
Determine if all arguments are of type 'string'.

Position

xCardinalPosition
A convient way to get the coordinates of an element's 'cardinal' (or 'compass') points.
xCen
Center an absolute-positioned element.
xCenter
Center a positioned element within the current client window space. If w,h not specified, then the existing width and height of e are used.
xGetEleAtPoint
Returns a reference to the element with the highest z-index which contains the given absolute point.
xHasPoint
Determines if an element contains an absolute point. The element's boundary is extended (negative clip), or contracted (positive clip) by the clipping parameters.
xIntersection
Determine if two elements intersect and if so determine the intersecting rectangle.
xLeft
Return and optionally set the element's x coordinate.
xMoveTo
Set the element's x and y coordinates.
xOffset
Return an object with x and y properties giving the offset position of child relative to parent.
xPageX
Get the page-relative X position of the element.
xPageY
Get the page-relative Y position of the element.
xScrollLeft
Determine how far the window (or an element) has scrolled horizontally.
xScrollTop
Determine how far the window (or an element) has scrolled vertically.
xTop
Return and optionally set the element's y coordinate.

Size

xClientHeight
The inner height of the window not including any scrollbar - that is, the "viewport".
xClientWidth
The inner width of the window not including any scrollbar - that is, the "viewport".
xClip
Set the element's clipping rectangle. If ele is the only argument then set clip to existing width and height.
xColEqualizer
Equalize the heights of any number of columns. Pass any number of pairs of elements to this function.
xDocSize
Determines the (largest) width and height of the 'document'.
xHeight
Return 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.
xResizeTo
Resize an element.
xWidth
Return 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.

String

xCamelize
Converts a CSS property name string (dash-separated) to a camel-cased string (style object property name).
xCapitalize
Capitalize the first letter of every word in str.
xHex
Converts an integer to a hex string.
xJoin
Serialize an object. Reverse the operation with xSplit.
xPad
Pad a string, on the left or right, to a specific length using a specific character.
xParseColor
Parse a color string or number into its components.
xRgbToHex
Converts three numbers (representing RGB colors) to a hex string in the form "#RRGGBB".
xSplit
Split 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.
xStrEndsWith
Returns true if s ends with end.
xStrRepeat
Repeat a string.
xStrReplaceEnd
Replaces newEnd.length characters at the end of s with newEnd.
xStrStartsWith
Returns true if s begins with beg.
xTrim
Removes leading and trailing white-space from a string.

Style

xAddClass
Adds a class name to an element.
xDisplay
A safe wrapper for element.style.display.
xFindAfterByClassName
Finds the first element after the given one that is from a given class.
xFindBeforeByClassName
Finds the first element before the given one that is from a given class.
xGetComputedStyle
A safe wrapper for getComputedStyle and currentStyle.
xGetCSSRules
Extracts CSS rules from the style sheet object (IE vs. DOM CSS level 2).
xGetStyleSheetFromLink
Extracts style sheet object from the HTML LINK object (IE vs. DOM CSS level 2).
xHasClass
Returns true if an element has a specified class name
xHasStyleSelector
Checks whether any of the stylesheets attached to the document contain the definition of the specified style selector (simple string matching at the moment).
xHasStyleSheets
Checks browser support for stylesheet related objects (IE or DOM compliant).
xInsertRule
Insert a new rule into a styleSheet.
xOpacity
Set or get the opacity of an element.
xRemoveClass
Removes a class name from an element
xStyle
Set 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.
xTagStyle
Set any style property for any number of tags.
xToggleClass
Toggles a class name on or off for an element
xTraverseDocumentStyleSheets
Traverses all stylesheets attached to a document (linked as well as internal).
xTraverseStyleSheet
Traverses 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).

Table

xTable
This 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.
xTableCellVisibility
Set the visibility of a table cell.
xTableColDisplay
Set the display of a table column.
xTableCursor
Mouseover highlight on rows and cells.
xTableCursor2
Mouseover highlight on rows and cells. Click to select a cell.
xTableHeaderFixed
xTableHeaderFixed 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.
xTableIterate
Iterates thru all rows and cols of a table and calls fnCallback for each.
xTableRowDisplay
Sets the display of a table row.
xTableSync
Assign a function to handle events which occur on either table and access corresponding TDs.

UI

xBar
Bar-Graph Object
xCalendar
xCalendar 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.
xCollapsible
Creates 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.).
xDialog
Provides a dialog box framework.
xFenster
xFenster 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.
xMenu1
xMenu1 Object Prototype
xMenu1A
xMenu1A Object Prototype. A variation on xMenu1. The menu slides down and up.
xMenu1B
xMenu1B Object Prototype. A variation on xMenu1A. The menu requires a click to close and opening one closes any others that were open.
xMenu5
Only 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.
xMenu6
A UL-based menu with unlimited levels and many other features.
xModalDialog
A simple modal dialog box object.
xPersistentDisplay
xPersistentDisplay provides persistent display or non-display of elements with specific CSS class names.
xPopup
A 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).
xSplitter
This 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.
xTabPanelGroup
Downgradeable, accessible, tabbed panels.
xTextArea
A wrapper around an html textarea allowing manipulation of its contents using normal javascript string methods.
xTooltipGroup
Different tooltips applied to groups of elements.

Window

xWinClass
An unobtrusive version of xWindow
xWindow
xWinOpen
A simple alternative to xWindow.

xLibrary

Description

The 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.

Source

xLibrary={version:'4.24',license:'GNU LGPL',url:'http://cross-browser.com/'};

Public Properties

versionstring
licensestring, default: "GNU LGPL"
urlstring, default: "http://cross-browser.com/"

Revisions

4.24: *** Not Yet Released ***
  • xSplit r1, xJoin r1 - Added to X.
4.23: 14May2011
  • xDef r2, xStr r2, xNum r3, xGetElementsByClassName r7, xGetElementsByAttribute r3, xAddHandlers r2 - Minor improvements. See revision notes for each function.
  • xTableHeaderFixed r12 - Added the "clean" method.
  • xInA r1, xFlGet r1, xFlWrite r1 - Added to X.
  • xFenster r21 - Added support for a "control menu".
  • xHttpRequest r11 - If (r) rand param is added even for POST and the full Math.random() value is used.
  • xPersistentDisplay r1 - Added to X.
4.22: 26Nov2010
  • Removed xDisableDrag and xDisableDrop. They were no longer needed since xEnableDrag rev 7 and xEnableDrop rev 3. Renamed xEnableDrag2 to xDragInFence.
  • xCen r2
  • xAnimation r5 - Unlimited number of axes! Updated all animation methods.
  • xAnimation.sizeLine r1 - Added to X.
  • xFenster r20 - New features and big improvements! Thanks very much to everyone who contributed!
  • xTableHeaderFixed r11 - Just keeps getting better. Thanks very much to everyone who contributed!
  • xWidth r8
  • xHeight r8
  • xTrim r2
  • xCalendar r4 - Added to X.
  • xAddHandlers r1 - Added to X.
  • xStrRepeat r1 - Added to X.
  • xStyle r2
4.21: 11Feb2010
  • XAG 1.0 and XPP 1.0 - improvements and bug fixes.
  • xTextArea r1 - Added to X. Contributed by krumpet. This is awesome. Thanks very much!
  • Added more comments to "x_symbol_template.xml" and made it available in the "cross-browser.com/templates" directory.
  • A few improvements to "view.php" to support optional nodes.
4.20: 28Jan2010
  • Renamed xEachId to xEachE, r2.
  • Renamed xEachNum to xEachN, r2.
  • xParent r2 - rewritten.
  • Renamed xParentNode to xParentN, r2.
  • Added comments in xwidth.xml regarding problem with border-collapse.
  • Improvements to the Ant build files.
  • X Tools directory is now "x/tools/" for the executables and "x/tools/prj" for the source and project files. Open "xtools.workspace" in Code::Blocks. Executable files are provided for both Windows and Linux.
  • xTableHeaderFixed r8 - The experimental version has now been moved into its official library file.
4.19: 23Dec2009
  • xTableHeaderFixed r7 - Adapted to work with Ajax apps! See revision notes.
  • Both 'x_core.js' and 'x_event.js' are deprecated. Temporarily, I am still including them in the download package. Instead of those files, please just use 'x.js'. Thanks!
  • Added three functions to 'x.js': xEachId, xEachNum and xOffset.
  • xEachId r1 - Added to X.
  • The following have been removed from the X Library: xHttpRequest2, xOffsetLeft, xOffsetTop, xCreateElement, xAddEventListener2, xAddEventListener3, xRemoveEventListener2, xAppendChild, xBackground, xColor, xGetCookie, xSetCookie, xDeleteCookie, xEvalTextarea, xGetElePropsArray, xGetElePropsString, xInnerHtml, xShow, xHide, xTimer, xVisibility and xZIndex. These files will now be in "x/lib/old".
  • xOffset r1 - Added to X.
  • xAnimation.rgbByClass r1 - Added to X.
  • xTableHeaderFixed r6 - See revision notes. xTableHeaderFixed2 has been removed.
  • Updated license file to GNU LGPL v3.
  • xConsole r1 - Added to X.
  • xAnimation r4 - See revision notes.
  • xTableHeaderFixed2 r1 - Added to X.
  • xTagStyle r1 - Contributed by Charles Belov. Thanks!
  • xCookie r2: See revision history.
  • xTableHeaderFixed r4: See revision history.
  • xResizeTo r2: now returns an object with w and h properties. Thanks, Vic!
  • Improved documentation for xWidth and xHeight.
  • xCookie r1 - Added to X. xGetCookie, xSetCookie and xDeleteCookie are now deprecated.
  • xFenster r19.1: See revision history.
  • xSplitter r4 - I added iframe support. See the demo.
  • xTableHeaderFixed r3 - Generated id of fixed table was not unique with multiple xTableHeaderFixed objects on a page.
  • xCen r1 - Added to X.
  • xAniWH r1 - Contributed by Thomas. Thanks!
  • xHttpRequest r10 - Combined multiple var statements into one.
  • xCamelize r2 - Combined multiple var statements into one.
  • xGetCookie r2 - Combined multiple var statements into one.
  • xGetElementsByClassName r6 - Combined multiple var statements into one and use array literal instead of new Array.
  • xHeight r7 - Combined multiple var statements into one.
  • xScrollLeft r4 - Combined multiple var statements into one.
  • xScrollTop r4 - Combined multiple var statements into one.
  • xWidth r7 - Combined multiple var statements into one.
4.18: 16Feb2009
  • Including another precompiled library, "x.js", which is "x_core.js" and "x_event.js" combined.
  • Added xEachNum.
  • xGetElementsByClassName: Improved documentation.
  • xGetURLArguments r3: Used shorter local variable names.
  • Added xCenter, contributed by Arthur Blake.
  • xFenster r18, r19: See revision history.
  • xSetCookie r4 and xDeleteCookie r5: Added the 'domain' parameter.
  • xClientHeight r6: Commented out "&& !w.opera" because of a difference with Opera 9.5.1. Does this change need to be made for xClientWidth as well?
  • xFenster r17: Major improvements! See revision histories for revs 15.1 and 16.
  • XC now runs on Linux (and possibly other *nix)! Thanks very much to everyone at the forums who helped! See the XC Reference for details.
  • Added xModalDialog and xAnimation.imgSize to X.
  • xModalDialog r2: Made some changes to support having a Confirm dialog (see the demo). Please note that this object is likely to get re-implemented at some time.
  • xHttpRequest r9: Major improvements! See revision histories for revs 5 through 9.
  • Added xTableCursor2, gebura's enhancement of xTableCursor.
  • Added xRound, suggested by ChrisNelson.
  • xTabPanelGroup r12: Removed unload method - now adds its own unload listener. Added the instances object so your app does not have to keep a reference to the tpg object: xTabPanelGroup.instances['outerContainerID']
  • xHasPoint: Improved documentation.
  • Added xLoadLink.
  • xEnableDrag r8, xGetEleAtPoint r3, xGetElementsByTagName r5 (See revision histories).
4.17: 10Jul2007
  • xFenster: When the client is an iframe, assign clientId to the iframe's "name" property. This makes the iframe accessible like this: window.frames["MyFensterId"].
  • xFenster: Added a window resize listener which resizes the fenster if it is maximized. Made "maximized" property public. Renamed "xFenster.z" to "xFenster.nextZ". The following change may require changes in your application code: All callback functions, if provided, are called before their event occurs and must return true or false to allow or cancel the event's default action. The documentation has been updated to explain these changes.
  • xMenu6: Unload is no longer public. Added the static 'instances' object, indexed by the UL's ID.
  • xInsertRule: If idx is -1 the rule is appended to the end.
  • xEnableDrag and xEnableDrop: Reimplemented (see http://cross-browser.com/forums/viewtopic.php?id=62). Note that "this" is now invalid in the callback functions. Removed "limits" feature (see xEnableDrag2).
  • xDisableDrag and xDisableDrop: These functions are no longer needed because of reimplementation of xEnableDrag and xEnableDrop.
  • xEnableDrag2: Initial release. This function is backwards compatible with rev 6 of xEnableDrag.
4.16: 03Jul2007
  • All "/x/x_*.js" files have been deleted except for "x_core.js" and "x_event.js". Files with "*_nn4.js" also were not deleted but were moved to the "old" folder. Updated all affected demos.
  • The following functions have been removed from "/x/x_core.js" but not from "/x/lib/". These functions remain in X only for backwards-compatibility. Access the native properties directly instead of using these functions: xOffsetLeft, xOffsetTop, xColor, xBackground, xZIndex, xParent, xShow, xHide, xVisibility, xDisplay, xAppendChild, xCreateElement and xInnerHtml. I've updated all demos and other X symbols to not use these functions.
  • xStyle has been added to "x_core.js". It can be use instead of xColor, xBackground, xZIndex, xShow, xHide, xVisibility and xDisplay - and has other uses.
  • xClip has been removed from "/x/x_core.js" but not from "/x/lib/".
  • xEvent: Erik Kangas discovered a strange situation where e.type does not exist (as reported by FF). So I added "if (typeof e.type == 'string')". Thanks, Erik!
  • xMenu6: Added sLblAClass, sItmAClass and sActiveItmId parameters. Added the "open" method which provides for an auto-open feature.
  • xSmartLoad has been contributed by Chris Nelson - thanks! I also added xSmartLoad2.
  • xSmartLoadScript now just calls xSmartLoad.
  • xInclude has been completely removed from X. Use xSmartLoad.
  • xFenster: CC'd code in paint method now includes IE7 because IE7 needs it in quirks mode. Added the static property "focused" which is used to focus the appropriate fenster when some other fenster closes.
  • xFenster: Check the updates to the public properties available. I apologize for the frequent changes - but I anticipate more.
  • xFenster: gebura caught some problems: (1) a typo ("me.con.style.display = 'none'" had no terminating semicolon). It was causing errors when compressed. (2) The use of "for...in" conflicted with code such as "json.js" which adds properties to "Object.prototype". I'm now using "hasOwnProperty()" in those loops. Thanks, gebura!
  • XC 1.06 is released with this distribution. There was a bug fix. See the XC Revision History.
  • xStrStartsWith: KevinPrudhomme spotted a bug. "if( r == l )" should have been "if( r < l )". Thanks, Kevin!
4.15: 04Jun2007
  • This release includes a big update to XC! See the XC Revision History.
  • The X Quick-Start document has been improved and a tutorial added.
  • The sniffer variables have been completely removed from the X Library.
  • xEnableDrag: I commented-out the line added in rev 2, restricting the drag to the left mouse button, because I'm still uncertain about the values assigned to event.button by Safair/WebKit.
  • xEvent: Reduced size by 322 bytes but retained same functionality except for: The button property is only valid for W3C-compliant browsers and IE (currently the button property is invalid for Safari/WebKit). The button property is 'undefined' for non-mouse events.
  • xFenster r7: I think it was a bad idea to use "_i" as a local var equivalent for "this" - I'm now using "me". Now a dblclick on the titlebar will maximize/restore (Thanks to Patrick for this suggestion).
  • xFenster r8: Added 'en' and 'fn' parameters and implemented those features. Removed 'unload' method and added an unload handler via xAddEventListener - but it needs to be implemented. Started z-index at 100 instead of 0.
  • xFenster r9: There were quite a few changes based on my testing in Apollo/Scout. xFenster now looks and works the same for me in Opera 9.20 (WinXP), FF 2.0.0.3 (WinXP), Apollo 1.0.Alpha1 (WinXP), IE6 (WinNT) and IE7 (WinXP). The xFenster prototype's interface has changed substantially so be sure to review the documentation. All the xFenster demos have been updated to work with this revision. Note that the static "xFenster.instances" is no longer an array, it is now an object. The unload listener has now been implemented.
  • xClientWidth: In my tests with Apollo I found that "document.compatMode" is undefined. If this code branch isn't taken then Apollo returns some strange values for d.body.clientHeight. So I added the check for "!d.compatMode ||". Since d.compatMode was not supported in IE5 I tested this in IE5 and it works fine because "d.documentElement" also does not exist in IE5. The same change was made in xClientWidth altho the only strage results were seen in xClientHeight.
  • xSplitter: Now you can set separate bar limits for both the left (or top) and right (or bottom) panes.
  • I've added xGetElementsByClassName to the file "x_core.js".
  • The file "x/x.js" is no longer included in the distribution file. That file contained "all" X symbols, and I intended for it to be a convenience while developing offline (although I never used it myself). But I've noticed many people using it online - and I absolutely don't want that. I've went to a lot of trouble to provide you with ways to optimize your library files. The file "x.js" is huge (77KB) and to use it online just makes X look bad.
  • Important Notice of upcoming changes to the X Library! For details and to post your comments visit this topic at the forums.
4.14: 21May2007
  • I found a typo in xFenster ('ifrm' should be 'client') left over from the r4 changes. It wasn't causing a problem and so I didn't spot it in my r4 testing. xFenster has also been updated with new features. See the docs for xFenster for details.
  • In xWalkUL, added the 'level' feature and reduced size by 17 bytes. This change does not affect backwards compatibility.
  • This release includes a revision to XC (v1.04). The XC Reference now has all revision history for XC. This X release was made mainly because of a bug found in XC 1.03.
  • In xTableHeaderFixed, the loop adding tables to the 'tables' array was starting on the wrong index. Thanks very much to Thiago for finding this bug and submitting a fix.
4.13: 27Apr2007
  • I've made a change to xTooltipGroup based on an awesome 'tip' ;-) from Michael Hodgins. If grpClassOrIdList is a class then all trigger elements' titles are saved in the element's xTooltipText property. The element's title attribute is then set to "" so it will not cause a system tooltip. Thanks, Michael!
  • With the above change, I will start putting the rev number (from the xml file) at the top of all symbol src files.
  • In xWidth and xHeight: This rev reverses the first part of r4. Now it does not reference xClientWidth/xClientHeight.
  • I added the following functions: xAniXY, xAniLine, xAniOpacity, xAniRgb.
  • I made an important update to XC, which is now v1.03 (the documents 'x_structure' and 'xc_reference' have been updated accordingly): I caused problems by trying to have xAnimation methods as separate symbols. Now those methods will have symbols like this: "xAnimation.methodName". I modified get_symbol_index and wrote str_tok. This is not a solution, but just a quick bandaid because to get, for example, "xAnimation.css" included in the output library XC must find the symbol "xAnimation.css" somewhere in the source. It can be put in a comment for this purpose. After this I saw that methods could possibly be ouput before their object. I used qsort and wrote compare_fn. Symbols are sorted by type and then by id. The type precedence is: V, O, P, M, F.
  • Alexander has submitted a brilliant new velocity function for xAnimation. It is a 'combination' of accel types 1 and 2. Thanks very much, Alexander! Here's a graph of the current velocity functions: http://cross-browser.com/images/animation_vf_graph.gif
  • For xWidth and xHeight, I went back to r4. I would like to make the r5 change, but it breaks too many demos. When you need the width/height of an element's parent, if that parent happens to be document/html/body then what you really want is clientWidth/clientHeight. I'll have to revisit this later.
4.12: 17Apr2007
  • xFenster has been re-implemented. It now supports containing a DIV or an IFRAME, and there is a demo for each.
  • xAnimation has been re-implemented (based on 'x/examples/animation_impl.html'), and there are demos for the new methods: line, arc, para, size, corner, css, rgb, opacity and scroll.
  • Changed xGetComputedStyle to use xGetElementById like most X functions.
  • In xEnableDrag, added xEvent object as last argument in calls to callback functions.
  • The sniffers have been removed from "x_core.js". They haven't been in use by X for some time. You should consider all symbols from the file "xsniffer.js" to be deprecated. I may remove that file from X soon.
4.11: 26Mar2007
  • Added xRgbToHex.
  • In xEvent: I forgot to remove " @end" from the rev 8 change. It was causing a syntax error in IE.
  • Added animation_tech to the demos.
4.10: 23Mar2007
  • 'X Viewer' PHP code is now included in the distribution. It's nothing special - but many people have asked for it. The two files (view.php and view_lib.php) are in "/x/lib/".
  • xTreeMenu renamed to xMenu6. Added bLblIsItm feature.
  • Added new features to xTooltipGroup.
  • Re-implemented xTableCursor to support Stephen Hulme's idea using xAddClass and xRemoveClass. xTableCursor2 has been removed from X.
  • Made bug-fixes and improvements to xAddClass, xHasClass and xRemoveClass.
  • In xEvent, set button=null for non-mouse event - was 3.
  • Added xTrim, xParseColor, xCamelize.
  • For xAddEventListener, added the closure for DOM0 handlers.
  • Experimental change to xHttpRequest: Set "_r.onreadystatechange = function(){}" before calling abort (needs more testing). Ref: "http://www.quirksmode.org/blog/archives/2005/09/xmlhttp_notes_a_1.html".
  • xEvent: I don't like adding a sniff but I don't know of any other way to support the button prop for Safari. Thanks very much for everyones help on this bug!
4.09: 10Feb2007
  • Changed format of first conditional compilation statement in xHttpRequest2. XC was giving this: /*@cc_onvar _x=null;@*/. It was causing 'x.js' to throw errors in IE.
  • No changes to XC for now.
4.08: 30Jan2007
  • Bug fix for xEditable submitted by HFT member ohvayha. Thanks!
  • Mark submitted a fix/improvement for xEnableDrag. It now only drags on a "left" click. Thanks!
  • Added the 'button' property to xEvent. Supports all IEs and other W3C-compatible browsers (FF, Opera8+, Safari, etc).
  • XC update (v1.02) - When removing comments, JScript conditional compilation comments are not removed.
  • Added xTableCursor2, a more unobtrusive version of xTableCursor, submitted by Stephen Hulme. Thanks!
  • Added xGetEleAtPoint, xTableHeaderFixed and xTable.
  • Added bounding rectangle support to xEnableDrag.
  • Made another xHttpRequest demo which resulted in an update to xHttpRequest.
4.07 z2: 10Jan2007
  • Modified xTableSync. It was also missing a ';'.
  • Made general updates to several files in the distro, and added several more demos.
  • Made updates to xPageX and xPageY.
4.07: 09Jan2007
  • Added xTableSync, xTreeMenu, xDocSize, xHttpRequest, xHttpRequest2, xWalkUL, xEnableDrop and xDisableDrop.
  • Added xDialog (contributed by Aaron Throckmorton).
  • In xTimer, added xTimer.tick() for setting the timing resolution. Changed default resolution to 25 (it was 250). Thanks for the great suggestion by Dmitry!
  • Thanks very much to Kravvitz at SPF who pointed out a problem with xGetElementsByClassName. I have modified the function.
  • Christian has pointed out an IE bug in getElementById and I've been doing some testing on it.
  • Removed the simulated events (window resize and scroll) from xAddEventListener. xAddEventListener2.js is now the original implementation. Also added xAddEventListener3 which has Ivan Pepelnjak's enhancements for multiple scroll and resize listeners and multiple DOM0 listeners. Thanks Ivan! If you use xAddEventListener 2 or 3 then use xRemoveEventListener2.
  • This may be the first time I've ever done this: I renamed xWalkEleTree to xWalkTree3.
  • Made updates to xSelect to better support form submissions.
  • Reimplemented xFirstChild, xPrevSib and xNextSib to be smaller and more robust.
  • Made a small improvement to xGetElementsByTagName.
4.06: 01Nov2006
  • Released XC 1.01! New option: objprefix, will prefix all X functions with an object name you specify. The xSplitter demo is now using this feature.
  • Fixed a bug that was in XC 1.0 which prevented a symbol file from being included if there was an app file with the same name and option +app was set.
  • In xPrevSib, xNextSib and xFirstChild the tag comparison is now case-insensitive. xGetElementById is now called for e so the first argument can be an element or id string.
  • In xDisplay, using try/catch since IE6dn doesn't support the table css properties. Thanks very much to Edward Glowacki.
  • xTooltipGroup now uses createElement to create the tooltip element.
  • Made improvement and fixed a typo in xFenster.
  • Improved documentation for xGetElementsByTagName, xGetElementsByClassName and a few others.
  • Added a new X function: xInsertRule.
4.05: 27Oct2006
  • Fawn caught a careless mistake I made in xClientWidth on 3Oct06, and caught a major bug in xTooltipGroup. Thanks very much, Fawn!
4.04: 27Oct2006
  • Thanks very much to Setemkia (Fawn) FallingTree for spotting a typo in xWalkTreeRev and a missing file (symbol_index.php in x/lib) in the 4.03 distribution.
4.03: 26Oct2006
  • There have been reports of a problem with xGetElementsByTagName, but I can't reproduce the problem. If you see the problem please let me know.
  • In xGetComputedStyle the variable 'c' was global, but should have been local. Thanks very much to Nicolas Le for spotting this.
  • In xLeft if ele.style.left=="" then use xGetComputedStyle.
  • In xTop if ele.style.top=="" then use xGetComputedStyle.
4.02: 24Oct2006
  • Released XC 1.0!
  • X no longer uses the browser-sniffer variables - they are still available if you need them. As a result, removed support for Opera 5/6 quirks.
  • Added xAnimation, xAniLine, xAniOpacity, xAniEllipse, xAniScroll and xAniSize.
  • Added missing semicolons to xFenster.
  • Small change to xGetElementById.
  • Added xOpacity.
  • Improved xTabPanelGroup.
  • moi contributed xColEqualizer.
  • Jerod Venema contributed xEditable.
  • Olivier Spinelli contributed xStrReplaceEnd, xStrEndsWith, xStrStartsWith, xWalkTree2, xWalkTreeRev, xWalkToFirst, xWalkToLast, xFindAfterByClassName, xFindBeforeByClassName and xParentNode.
  • Brendan Richards contributed xSmartLoadScript.
4.02: 04Oct2006
  • This version is not yet released but will be soon. (this file was previously named 'xversion.xml')
4.01: 22Sep2006
  • This release adds functions contributed by Daniel Frechette: xHasClass, xAddClass, xRemoveClass, xToggleClass, xEach, xEachUntilReturn, xTimes, and functions contributed by Ivan Pepelnjak: xGetStyleSheetFromLink, xGetCSSRules, xHasStyleSheets, xTraverseStyleSheet, xTraverseDocumentStyleSheets and xHasStyleSelector. There have been other code contributions and I'm working on adding them ASAP. This release includes a small change to XC: it will now accept a project filename that includes the '.xcp' extension. Now '.xcp' files can be associated with 'xc.exe' and you can run XC on a project file just by double-clicking it.
4.0: 30May2005
  • New X functions/objects: xCapitalize, xDeleteCookie, xTableCursor, xTabPanelGroup, xMenu5, xWalkEleTree, xPrevSib, xNextSib, xFirstChild, xCollapsible, xDisableDrag, xMenu1, xMenu1A, xMenu1B, xFenster, xSelect, xSlideCornerTo.
  • xWidth and xHeight now use xGetComputedStyle
  • Bug-fixes to xWinScrollTo - as a result of adding frame/ext.window support, I made changes to xScrollLeft and xScrollTop
  • Need to fix xCardinalPosition for Moz. I'd really like to rename this function... ?
  • Updates to xEvent
  • Modified xTableIterate
  • Modified xWalkTree
  • Thanks to Daniel FAIVRE for a bug-fix for xGetElementsByClassName
  • Fixed a bug for when xNum is passed NaN
  • Fixed a Moz/FF problem with xparaeq.php, but as a result, modified xscrollleft/top and xwidth/height with possibly experimental changes
  • xInnerHtml has returned
  • Removed the following files from '/x', their demos now use the files in '/x/lib': x_bar.js, x_load.js, x_popup.js, x_timer.js, x_tip.js, xcollapsible.js

License

By your use of X and/or CBE and/or any Javascript from this site you consent to the GNU LGPL - please read it. If you have any questions about the license, read the FAQ and/or come to the forums.

Tech Support

Forum support is available at the X Library Support Forums.

About Cross-Browser.com

Cross-Browser.com is the home of X - a cross-browser Javascript library, and many demos, applications, articles and documentation.

Search

Cross-Browser.com

World Wide Web

User Projects

If you are using X, XC or anything from this site, show off your work by posting a link in the X Showcase forum.