0.1.1 • Published 12 years ago
jquery-freeze v0.1.1
jquery.freeze
jQuery extension for freezing the state of the DOM and serializing as a string. The original use of this was to capture the state of the screen for auditing purposes.
Install
Bower
bower install jquery-freezeNPM
npm install jquery-freezeRaw
curl https://raw.github.com/cbmi/jquery.freeze/master/jquery.freeze.jsInclude
As a script:
<script src="/path/to/jquery.js"></script>
<script src="/path/to/jquery.freeze.js"></script>Or as a AMD module:
require(['jquery.freeze'], function($) {
// ...
});Use
// Bind to button or listen for a event, freeze the dom and send
// a POST to log the document. The server-side could write the data
// to an HTML file for later viewing.
$('#freezer').click(function(event) {
event.preventDefault();
$.post('/screenlog/', $.param({document: $.freeze()}));
});