- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Wed, 23 Jan 2008 22:50:40 -0800
nextSibling and previousSibling are useful, but not always what I want. I usually want to get a siblingElement than a sibling, which might be a text node. Dom.findNextSiblingElement = function(el) { for(var ns = el.nextSibling; ns != null; ns = ns.nextSibling) if(ns.nodeType == 1) return ns; return null; }; The same is true for childNodes. It would be useful to have: nextSiblingElement, previousSiblingElement, childElements Garrett -- boxbe is annoying--> I use Boxbe to protect my email, so please keep this code in your reply: JPV9KTNZ
Received on Wednesday, 23 January 2008 22:50:40 UTC