By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,181 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

next node

P: n/a
Lets say we have this:

<h4 onclick="findFollowingNode()">Find next node</h4>

<div>I want to get this node, (the div wrapper) so I can toggle
visibility</div>

It's been a while since I've written any DOM javascript and I simply
don't remember how to get the next (non text) node. Or at least what I
remember is wrong.

Google is full of unhelpful debris, at least the way I'm searching.

A pointer to code or a good DOM reference would be appreciated.

Jeff
Aug 8 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jeff wrote:
Lets say we have this:

<h4 onclick="findFollowingNode()">Find next node</h4>

<div>I want to get this node, (the div wrapper) so I can toggle
visibility</div>
In the W3C DOM there is a propertly nextSibling, access that until you
find an element node (nodeType === 1).
--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 8 '08 #2

P: n/a
Martin Honnen wrote:

As always. Perfect and thanks.

Jeff
Jeff wrote:
>Lets say we have this:

<h4 onclick="findFollowingNode()">Find next node</h4>

<div>I want to get this node, (the div wrapper) so I can toggle
visibility</div>

In the W3C DOM there is a propertly nextSibling, access that until you
find an element node (nodeType === 1).

Aug 8 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.