document.getElementById().getContext('2d') is not a function
<p>This keeps getting an error message saying that it is not a function please help!!</p>

<pre><code>var ctx = document.getElementById('canvas').getContext('2d');
</code></pre>

<p>HTML:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Canvas Race&lt;/title&gt;
    &lt;script src="jquery-2.2.3.js"&gt;&lt;/script&gt;
     &lt;style type="text/css"&gt;
        canvas {
            border: 1px solid black;
            background-image: url("http://www.gamefromscratch.com/image.axd?picture=road2048v2.png");
            background-size: 200px 300px;
            background-position-y: -81px;
        }
        &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

    &lt;div id="canvas"&gt;
        &lt;canvas id="myCanvas" width="1100" height="150" &gt;&lt;/canvas&gt;
    &lt;/div&gt;
    &lt;div id="winner"&gt;&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Javascript:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var blueCar = new Image();
    var redCar = new Image();

    // images
    function image(){
        blueCar.src = "http://worldartsme.com/images/car-top-view-clipart-1.jpg";
        redCar.src = "http://images.clipartpanda.com/car-clipart-top-view-free-vector-red-racing-car-top-view_099252_Red_racing_car_top_view.png";
        window.requestAnimationFrame(draw);
    }
    function draw() {
        var ctx = document.getElementById('canvas').getContext('2d');
        ctx.globalCompositeOperation = 'destination-over';

        //blue car
        ctx.drawImage(blueCar, 10, 10, 100, 100);
    }
    image();

&lt;/script&gt;
</code></pre>

<p>I've already searched around but I haven't found anything that works I don;'t know if it has to do anything with my jquery.</p>