title: One page website with CodeIgniter and jQuery(AJAX)
body: <p>I am looking to build a one page website, that runs on <code>PHP</code> (obviously using <code>CodeIgniter</code>) and <code>AJAX</code> (supported by <code>jQuery</code>), at the moment I have a menu that gets populated from the database, depening on what catergories are selected as being on line, the then build a an url using those results,</p>
  
  <pre><code>if(isset($main_menu)) {
      foreach($main_menu as $row) {
          print "&lt;li&gt;&lt;a href='index.php/home/category/$row-&gt;category_id'&gt;$row-&gt;category_name&lt;/a&gt;&lt;/li&gt;";
      }
  }
  </code></pre>
  
  <p>My problem is that for this I need to run all the queries from the controller (home) as the user can never leave the page, effectively what I want to happen, is that if the user clicks for example <code>Blog</code>, I want a query to run, that selects from the content table in the database all the content that is associated with the blog category I then want to display it in an accordion style, in the <code>right-content div</code> of my site.  Then if the the users selects for example inspiration then the query runs again, and adds the inspiration data to same div as the blog data but in its own accordion and not overwriting the blog data.</p>
  
  <p>Is that followable, and more importantly possible, and where the hell would I start, I can use both <code>CodeIgniter</code> and <code>jQuery</code> and really want to push theses technologies and myself.</p>
  
  <p>Thanks</p>