Whenever I use Console in Chrome's Developer Tools or Firebug to interpret a jQuery selector, it only returns the innerHTML of the result of the selector if only one item matches. If multiple items match, I'm given the array of matched items, with their innerHTML as the contents of each array slot. However, in Safari,开发者_C百科 a navigable tree representing the actual returned jQuery object is presented. This is far easier to work with when looking for properties I want to get/set, etc. I can get similar output in Firebug or Chrome Developer Tools if I pass the selector to a console.log()
call, but this is a pain. Is there any way to have the WebKit Console behave similarly in Chrome to how it behaves in Safari?
Also try using the jQuery shell extension for Google Chrome.
You can view in the scope variables sub section. If you put a breakpoint in your selected script.
精彩评论