title: CodeIgniter/AJAX : AJAX does not load partial view
body: <p>My ajax function only works when i try to load a particular view (createClass.php) but it doesn't work for other views (classAction.php/etc.)</p>
  
  <p>script:</p>
  
  <pre><code>//--------------this works---------------
  $(function(){
        $(".classloader").click(function(){
          //alert("clicked");
  
          $("#functions").load("createClass");
         //$("#functions").load("classActions"); this doesn't work for some reason
        });
      });
     //-----------this doesn't----------- 
      $(function(){
        $(".classAction").click(function(){
          //alert("clicked");
         $("#functions").load("classActions");
        //-- $("#functions").load("createClass"); but this works for some reason 
        });
      });
  </code></pre>
  
  <p>view:</p>
  
  <p>createClass (partial view):</p>
  
  <pre><code>&lt;div class="jumbotron col-md-12"&gt;
        createClass &lt;!-- h1 --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>classAction (partial view):  </p>
  
  <pre><code>&lt;div class="jumbotron col-md-12"&gt;
        classAction &lt;!-- h1 --&gt;         
  &lt;/div&gt;
  </code></pre>
  
  <p>home (main view):</p>
  
  <pre><code>&lt;button type="button" class="btn btn-success btn-block classAction"&gt;Class Action&lt;/button&gt;
  
  &lt;button type="button" class="btn btn-default btn-lg btn-block classloader" &gt;Create Class&lt;/button&gt;
  
  &lt;div class="col-md-offset-1 col-md-8"&gt;
  
          &lt;div class="jumbotron col-md-12" id="functions"&gt;
             Partial views should be loaded here
  
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>