开发者

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

开发者 https://www.devze.com 2023-02-22 19:12 出处:网络
Is there any good way to see/debug the result of a jQuery selector ? Let\'s say we have something like this

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? 开发者_StackOverflow

Update

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


in firebug or chrome console do:

console.log($('div > span').parent());


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


console.log($('div > span').parent())

with firebug or chrome.

0

精彩评论

暂无评论...
验证码 换一张
取 消