Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
105
rated 0 times [  107] [ 2]  / answers: 1 / hits: 65873  / 13 Years ago, tue, november 15, 2011, 12:00:00

With $(this).data(events); returning [object Object], I need to see what's actually going on in there. I found this:



var Finder = ;
$.each($(this).data(events), function(i, n){
Finder += Name: + i + , Value: + n + | ;
});


However, n still returns [object Object]:



EDIT: (Output) --



Name: click, Value: [object Object] | 


--



Is there an efficient way to show everything inside that sucker, kind of like print_r in PHP?


More From » jquery

 Answers
21

console.log($(this).data(events)) in Chrome (or other browsers) would allow you to drill into the object.



Ctrl+Shift+J gets you to the console in Chrome.


[#89102] Monday, November 14, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sophiak

Total Points: 242
Total Questions: 90
Total Answers: 103

Location: Liechtenstein
Member since Wed, Dec 8, 2021
3 Years ago
;