Uncaught TypeError: Object function (j,s){return new b.fn.init(j,s)} has no method 'when'
<p>I am trying to use a .getJSON and .when function to use some data in a routes calculation.  Unfortunately, the console is giving me the above error.  Please take a look and see what could be going wrong?  Thank you! (I have checked and the .getJSON code is working fine, and spitting out the array I need.  I just need to retrieve it and put it into waypts). </p>

<pre><code>function calcRoute() {
    var start = document.getElementById('start').value;
    var end = document.getElementById('end').value;
    var waypts = [];
    var data = $.getJSON("/westcoast_map.php", { westcoast_id : $('.opener').data('westcoast_id')});

    $.when(data).then(function(theData){
                      waypts = theData[1];
                      });
</code></pre>
