<!DOCTYPE html>src="//libs.baidu.com/jquery/1.10.2/jquery.min.js"$(document).ready(function(){var treeTraversal = $("div").find("p,span").map(function(){return this.tagName;}).get().join(", ");$("div").after("<h2>" + treeTraversal + "<h2>");});This is a div element. My children are:In this example, we return all descendant elements of div.