If you want to clear all canvases found in a given div with jQuery, you can use the following code:

    // Clear all canvases found in the given div, including all child canvases and sub child canvases.
    $('#DivToFind canvas').each(function(idx, item) {
        var context = item.getContext("2d");
        context.clearRect(0, 0, item.width, item.height);

Leave a Reply

