title: i get this error in my browser console "typeError: $.ajax function not defined" in my codeigniter application
body: <p>here is my search function from the controller </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public function search()
   {
    echo "content from database table" ;
    
   }</code></pre>
  </div>
  </div>
  </p>
  
  <p>and here is my script tag which is loaded through a footer view of my codeIgniter application</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
    $('#state').change(function(){
    var stateIndex    = this.selectedIndex ; 
    var selectedState =
                this.options[stateIndex].value ; 
    var url = '&lt;?php echo site_url('stores/pick') ?&gt;' ;
    console.log(selectedState);
    $.ajax({
     dataType : 'html',
     type : 'post',
     data : { stateSelected : selectedState},
     url : url , 
     success : function(returnedData){
         alert(returnedData);
        }
    });
   });
   })</code></pre>
  </div>
  </div>
  </p>
  
  <p>and after the onchange event on the select element is the of that alert to display I got this "typeError: $.ajax not defined" in my browser I have spent days searching internet regarding this but unble to locate an answer. Please will appreciate any useful help tips.
  thanks in advance</p>