This should be simple, but I couldn't figure this out while debugging a grease monkey script. Can a JQuery object, such as a single element, be converted to JSON?
e.g. JSON.stringify($("<p />"))
I've gotten a cyclical reference errors.
I've been experimenting here: http://jsfiddle.net/q7ywV/2/
html
<p> whatever </p>
<p> whatever2 </p>
js
try {
zoom = JSON.stringify($("p").eq(0));
console.log(zoom);
}
catch (e) {
console.log(e);
}