Monday, May 14, 2012

Walk DOM and report ID's and Parents

function walkReport() {
$("body").find("*").andSelf().each(function() {
    var parent = $(this).parent().attr("id");
    console.log(this.nodeName+" "+this.id+" and my parent is "+parent);   
});
}

No comments: