No, I'm not talking about the visualizer plugin.
There are cheap or free tools to visualize the results of XPath queries, or Regex.
Example:
Is there a similar tool that helps one visualize the results of jQuery selectors?
I 开发者_JAVA技巧know it wouldn't be difficult to build... Just wanna know if one exists yet.Use firebug. Open the console. Run something like this:
$("p").css('background-color', 'blue');
and press 'Run'.
Yep, this one does the job pretty well:
http://www.woods.iki.fi/interactive-jquery-tester.html
You can put $('div.product').get()
into Firebug or whatever console you're using to get a list of matching elements.
For Safari, the Web Inspector has a console you can use to achieve this.
精彩评论