Hi,
I am currently building a website in codeigniter that is based around the idea of being a one page, site, I currently have a main view that looks like this,
<?php
$this->load->view('template/main_menu.php');
$this->load->view('template/left-content.php');
$this->load->view('template/right-content.php');
?>
In the right-content view I have a structure that looks like this,
<div id="right-content">
<div id="accordion"></div>
Within another view I have some ajax that populates the #accordion
with the returned data, the retruned is placed in its only uniquely id'd div, my question is how to I get this data to then act as an accodion, I have tried the script in both the right-content view and the main view and get no accordion functiontionality, in essence what I currently have when some data has been fetched is this
<div id="right-content">
<div id="accordion">
<div class="blog">
<h2>Blog Header</<h2><!--This should be the click area for the accordion-->
<p>Content content content content content content content content
content content content content content content content content content
content content content contentcontentcontent content content content</p>
<!--<p> should be hidden unless this accodion is active</p>
</div>
I think my issue may be that each 'accordion' is being placed in it's own div first, this is not how it is on the accordion example.
Please can someone help me figure this out? Many thanks