var sketchpad = new Sketchpad({ element: '#sketchpad', width: 500, height: 300, }); function recover(event) { var settings = sketchpad.toObject(); settings.element = '#sketchpad2'; var otherSketchpad = new Sketchpad(settings); $('#recover-button').hide(); }