HTML to Image Convert Using jQuery

Convert div into image using html2canvas


$(function() { 
    $("#btnSave").click(function() { 
        html2canvas($("#widget"), {
            onrendered: function(canvas) {
                theCanvas = canvas;
                document.body.appendChild(canvas);

                // Convert and download as image 
                Canvas2Image.saveAsPNG(canvas); 
                $("#img-out").append(canvas);
                // Clean up 
                //document.body.removeChild(canvas);
            }
        });
    });
});
HTML to Image Convert Using jQuery HTML to Image Convert Using jQuery Reviewed by Bhaumik Patel on 8:23 PM Rating: 5