I created my first js app with canvas and it doesn't work. Code was coppied from http://fabricjs.com/ and just wrapped in jQuery.
fab.js
var $ = jQuery;
$(document).ready(function(){
var canvas = new fabric.Canvas('c');
var rect = new fabric.Rect({
left: 100,
top: 100,
fill: 'red',
width: 20,
height: 20,
angle: 45
});
canvas.add(rect);
});
html
<html>
<head>
<title>Fabric.js</title>
<script src="jquery-1.11.3.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="canvasjs.min.js"></script>
<script src="fabric.min.js"></script>
<script src="fab.js"></script>
</head>
<body>
<div id="c">
</div>
</body>
</html>
Uncaught Error: Could not initialize
canvaselement
What is going wrong?