JXtension Is Now jPaq!!!

JXtension has now been replaced by jPaq.  jPaq is a small, fully customizable JavaScript library.  The biggest difference between jPaq and most other libraries is the fact that with jPaq, you only download the functions, objects and classes that you want.  Many of the things that are available in JXtension can be found in jPaq.  Click here to see this fully documented JavaScript library.

JXDocs - JXtension Documentation Pages

This page contains documentation for features offered exclusively by JXtension.  In many cases, the objects already innately exist in JavaScript and JScript, but these objects are enhanced by using JXtension.

  • Array Instance Members
    These functions are part of each instance of the Array object.
    • clone(...)
      Create a shallow or deep copy of an array.
    • equals(...)
      Determine if two arrays have the same contents.
    • indexOf(...)
      Returns the first index of the specified parameter.
    • indicesOf(...)
      Returns an array of each index of the specified parameter.
    • intersect(...)
      Obtain an array of elements contained by two arrays.
    • subtract(...)
      Obtain an array of elements that are in the first array but not the second.
    • toString(...)
      Obtain the string version of an array, optionally in bracketed notation (recursively).
    • uniquify()
      Obtain a copy of an array without duplicates.
  • Array Object Members
    These functions are part of the actual Array object.
    • fromList(...)
      Returns an array version of a given JavaScript list.
    • parse(...)
      If the parameter is an array, the array is returned, otherwise a new array with the parameter as the only element is returned.
  • Color Object Members
    These functions are part of the custom Color object.
  • Color Instance Members
    These functions are part of each instance of the custom Color object.
    • new Color(hexCode)
      Initialize a color object with a hexadecimal color code.
    • new Color(strRGB)
      Initialize a color object with an RGB string.
    • new Color(r, g, b)
      Initialize a color object with values for red, green and blue.
    • combine(...)
      Blends two colors together.
    • getDarker(...)
      Returns a color a specific shade closer to black.
    • getHexCode()
      Returns the color as a hex code prepended with the pound (#) sign.
    • getLighter(...)
      Returns a color a specific shade closer to white.
    • getLuminance()
      Returns an approximation of the luminance of a color as number between 0 and 255.
    • getOpposite()
      Returns a color which is the opposite of this one.
    • getSafeColor()
      Returns either white or black.  Returns the color which contrasts the most with this color.
    • setColor(...)
      Sets the red, green and blue values of a color.
    • toGrayscale()
      Returns a shade of gray which corresponds with this color.
    • toString()
      Returns the color as a hex code prepended with the pound (#) sign.
  • Function Instance Members
    These functions are part of each instance of the Function object.
    • map(...)
      Executes this function on all of the elements within the given array.
  • Function Object Members
    These functions are part of the Function object.
    • concat(...)
      Creates function which executes the code from two or more other functions.
  • JX List Instance Members
    These functions and constants are part of each JX list created by the $(...) selection function.
    • addClass(...)
      Adds a class name to all of the selected elements.
    • bind(...)
      Binds a given function to a specific "on" event of all of the selected elements.
    • bindFocus(...)
      Binds two complimentary functions, which will be executed when the onfocus and onblur events are triggered, to the selected elements.
    • bindHover(...)
      Binds two complimentary functions, which will be executed when the onmouseover and onmouseout events are triggered, to the selected elements.
    • execute(...)
      Either executes a specified function, or "on" event handler for all of the selected elements.
    • filter(...)
      Further filters the selected elements according to the specified criteria or function.
    • get(...)
      Returns the specified property value for one or all of the selected elements.
    • getCSS(...)
      Returns the specified CSS attributes for one or all of the selected elements.
    • getElement(...)
      Returns the element at the specified index of the JX list.
    • getText(...)
      Returns the text of one or all of the selected elements.
    • hide()
      Hides all of the selected elements.
    • length
      The amount of elements that were found by the $(...) selection function.
    • remove()
      Removes all of the selected elements from the document hierarchy.
    • removeClass(...)
      Removes the specified class name from all of the selected elements.
    • set(...)
      Sets a specific property for all of the selected elements.
    • setClass(...)
      Sets the class name for all of the selected elements.
    • setCSS(...)
      Sets the specified CSS attribute to a specific value for all of the selected elements.
    • setHTML(...)
      Sets the innerHTML property for all of the selected elements.
    • setText(...)
      Sets the text for all of the selected elements.
    • show()
      Makes all of the selected selected HTML elements visible.
    • slice(...)
      Returns a certain portion of the list of selected elements.
    • unbind(...)
      Removes the specified function from a specific "on" event for all of the selected elements.
  • JX Object Members
    These functions and constants are part of the JX object.
    • $_GET[...]
      An associative array which contains all of the values passed by the GET form method to the page being viewed.
    • browser
      Indicates the internet browser with which the user is viewing the page.
    • browserVersion
      Indicates the version of the internet browser with which the user is viewing the page.
    • contains(...)
      Determines if one DOM element contains another.
    • deleteCookie(...)
      Removes the cookie with the specified name.
    • getCookie(...)
      Gets the value of the cookie with the specified name.
    • OS
      Indicates the operating system of the client computer.
    • set(...)
      Sets an attribute or multiple attributes for a given JavaScript object.
    • setCookie(...)
      Sets the value of the cookie with the specified name.  All other options are optional.
    • version
      Indicates the exact version (including the type) of JXtension that is being used.
    • xor(...)
      Determines the result of using the exclusive OR operator on two operands.
  • RegExp Object Members
    These functions are part of the RegExp object.
    • fromWildExp(...)
      Creates a regular expression from the given wildcard expression.
  • String Instance Members
    These functions are part of each instance of the String object.
    • findIndex(...)
      Returns one or more starting indices of the substrings which matched the specified wildcard expression.
    • findText(...)
      Returns one or more substrings which matched the specified wildcard expression.
    • findReplace(...)
      Returns the string with all of the substrings which matched the specified wildcard expression, replaced with another value.
    • indicesOf(...)
      Returns an array of all of the start position of a given substring.
    • remove(...)
      Removes a specific portion of the string.
    • replace$(...)
      JavaScript's native string replacement function.
    • replace(...)
      Returns astring with a specific substring replaced with another value.  The limit parameter has been added to allow for all instances of a substring to be replaced.
    • reverse()
      Returns the string with the characters in reverse order.
    • toProperCase()
      Returns the string with the first letter of each word capitalized.
    • trim()
      Returns the string without space characters at the beginning or end.
      NOTE:  This is only defined for browser missing this as native code.
    • trimLeft()
      Returns the string without the space characters at the beginning of the string.
      NOTE:  This is only defined for browser missing this as native code.
    • trimRight()
      Returns the string without the space characters at the end of the string.
      NOTE:  This is only defined for browser missing this as native code.

© 2010 Christopher West.  Powered by JXtension v1.1.