danidacar danidacar - 12 days ago 5
jQuery Question

How to see/display/debug the selected dom nodes with jquery?

Is there any good way to see/debug the result of a jQuery selector ?

Let's say we have something like this

var arr = $('div > span').parent();


How can I see what the selector contains?

Update



Just to make this a bit harder: Can I do the same in http://jsfiddle.net/ ?

Answer
var arr = $('div > span').parent();
document.write(arr.html());