AJAX
Basics
Data
DOM
Effects
Events
Forms
jQuery UI
Plug Ins
Traversing
The find()
method returns all direct children of the selected element.
The following example returns the one single elements which is a direct descendant of the demo2 element.
$("#btnDemo").click(function ()
{
$("#demo2").children().attr({ "class" : "text-danger"});
});