Skip to content

Instantly share code, notes, and snippets.

@robertz
Created July 17, 2012 17:20
Show Gist options
  • Save robertz/3130669 to your computer and use it in GitHub Desktop.
Save robertz/3130669 to your computer and use it in GitHub Desktop.
Sample jqDump document
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8" />
<title>Test Page</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<script src="jqDump.js" type="text/javascript"></script>
</head>
<body>
<div id="content" style="display: inline-block; width: 400px;"></div>
<script type="text/javascript">
$(document).ready(function(){
newObj = {
'key1': 'value 1',
'key2': 'value 2'
};
$("#content").html($.dump(newObj, false));
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment