Below is my code.I have used raphael sketchpad plugin. But I'm unable to draw,I just get blank sketchpad. Why is it so?
<html>
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="raphael-min.js"></script>
<script type="text/javascript" src="json2.js"></script>
<script type="text/javascript" src="raphael.sketchpad.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var sketchpad = Raphael.sketchpad("editor", {
height: 260,
width: 260,
editing: true
});
// When the sketchpad changes, update the input field.
sketchpad.change(function() {
$("#data").val(sketchpad.json());
});
});
</script>
</head>
<body>
<input type="hidden" id="data" />
<div id="editor" style="border: 1px solid #aaa; "></div>
<h1> Testing</h1>
</body>
</html>
When I try to add a stroke,I get a diagonal line.