I have found one youtube vid and downloaded the example but the sketch.js element did not work. In the download for sketch.js there is an example (that sort of works but not with mousedown) that I have tried to manipulate with no joy.
Sketch.js seems to have no help or email address to ask. So if anybody can point me in the right direction it would be great - it seems so simple
Heres what i have so far
Html section
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <script src="sketch.js" type="text/javascript"></script> <script src="canvas.js" type="text/javascript"></script> </head> <body> </body> </html>
Canvas.js
var sketchdataURL;
$(function()
{
$('body').append('<div id="mySketch" style="height: 400px; width: 400px; float:left; border: 3px solid brown;">' +
'<canvas height="400px" width="400px"></canvas>' +
'</div>');
$('body').append('<button id="makeSketch">Make Sketch</button> <button id="getSketch">Get Sketch Image</button>');
$('body').append('<div style="width:100%; height: 30px;"></div>');
//Bind
$('#makeSketch').click(function(event)
{
makeSketch();
});
$('#getSketch').click(function(event)
{
SketchGetURL();
});
});
function makeSketch()
{
$('#mySketch canvas').sketch();
}
function SketchGetURL()
{
var canvas = $('#mySketch canvas')[0];
sketchdataURL = canvas.toDataURL();
window.open(sketchdataURL);
}
I have tried with chrome/IE and firefox - anybody know what I am doing wrong ?

New Topic/Question
Reply


MultiQuote




|