Modifying the jQuery dump plugin to not open in a new window
I have been using the jQuery version of the javascript dump for a while now and it is invaluable especially when debugging JSON objects. The one down side to the plugin is it tries to display the dump contents in a new window, but I prefer to just get the html contents and stuff it into a div.
As it turns out it was pretty easy to modify the plugin to work how I wanted. To make the collapse/expand feature work I had to make the functions global but it is cool as long as you don’t have any functions on the page with the same name.
Here is an example page:
The dump results:

If you would like check out the dump plugin, here is my modified jqDump.js file.
“… I had to make the functions global but it is cool as long as you don’t have any functions on the page with the same name.”
Does this mean that you can only call it once and have it work properly?
Correct. The functions created with the plugin are tRow, tTable, tSource and tTarget. As long as you do not overwrite these global functions you are good