jQuery - children()

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.

div1
div2
div3
div4
div5

$("#btnDemo").click(function ()
{
    $("#demo2").children().attr({ "class" : "text-danger"});
});