loading the content of an accordian from json objects when page is loaded.

loading the content of an accordian from json objects when page is loaded.


I would like to programatically load an accordian when a page is
loaded from json objects (which I already have). I just can't fiqure
out how to load the accordian when the page is loaded. I understand
the $(document).ready(function(){
// Your code here
}); part but after that I'm a bit confused. I've looked over the site
and google it with no luck. The json is coming from a dojo.datastore.
I'm using an example I downloaded and the accordian looks like this->
            <div id="accordion" style="width:300px; float:left;">
                <div>
                    <h3><a href="#">First</a></h3>
                    <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor <div>
                </div>
                <div>
                    <h3><a href="#">Second</a></h3>
                    <div>Phasellus mattis tincidunt nibh.</div>
                </div>
                <div>
                    <h3><a href="#">Third</a></h3>
                    <div>Nam dui erat, auctor a, dignissim quis.</div>
                </div>
            </div>
The content I would like to place in the <div> under the h3 heading
and the <h3> or reformat it however is required.
I'm obviously a newbie and any help is greatly appreciated.
thanks