/ Published in: JavaScript
*"Only the elements which are are selected through the $ selector will get the extra DOMAssistant methods added to it."
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<p id="apple">Apple</p> <p id="banana">Banana</p> <p id="cherry">Cherry</p> <script type="text/javascript" charset="utf-8"> // this works x=$$('banana').addContent('foo'); // so does this y=$(x.next()).addContent('bar'); // but this is null, because this object doesn't have any DOMAssistant methods e.g. addContent z=x.prev().addContent('baz'); </script>
URL: http://groups.google.com/group/domassistant/browse_thread/thread/f6dbc459c1116a6a