The Node Utility provides an expressive way to collect, create, and manipulate DOM nodes. Each Node instance represents an underlying DOM node, and each NodeList represents a collection of DOM nodes. With Node, you can manage classNames (myNode.addClass(‘foo’)) and styles (myNode.setStyle(‘opacity’, 0.5)), create elements (Y.Node.create(‘< div id="foo" class="foo">< p>foo’)), and much more.[..sorry ,if i don't change the created html code,it will be showd HTML,not source]
Note: The method Y.get has been deprecated in favor of Y.one. The methods Node::query and Node::queryAll have been deprecated in favor of Node::one and Node::all. They still function as expected in this release, but support will be removed in a subsequent release.
The easiest way to include the source files for Node and its dependencies is to add the YUI seed file to your page, using the following script tag, and allow the YUI instance to download any additional files which may be required:
// Create new YUI instance, and populate it with the required modules
YUI().use('node', function(Y) {
// Node available, and ready for use.
});
jQuery(function($){
});
(function($){
})(jQuery);
you can see the detail page on “http://developer.yahoo.com/yui/3/node/”
PS:
on the end ,i find a bug on jquery,please look these codes:
when i open this page on browser,it showed blank page.so i changed it
it’ok…