Javascript Library Snippets
Javascript Library Snippets
These are my javascript libraries. I don't use them all on every project, but certainly there's something here for everyone.
GetNextStructuredSibling( objNode )
Traverses the document object model (DOM) to find the closes structured next sibling of the given node.
Updated May 3, 2006
GetParentNodeWithClassName( objNode, strClassName )
This crawls up the DOM looking for a parent node with the given class name.
Updated April 22, 2006
GetParentNodeWithTagName( objNode, strTagName )
This crawls up the DOM looking for a parent node with the given tag name.
Updated April 22, 2006
GetPreviousStructuredSibling( objNode )
Traverses the document object model (DOM) to find the closes structured previous sibling of the given node.
Updated May 3, 2006
Javascript String Replace Method
This demonstrates how to use the built-in Javascript String::replace() method to do both replace and non-replace actions on a string.
Updated July 19, 2006
String Trimming
Trim strings in Javascript with full trims, left trims, and right trims.
Updated May 3, 2006
String Trimming via the String Object Prototype
Uses the Prototype Directive to Give Javascript String Objects Inherent Trimming Functionality.
Updated May 3, 2006



