How to excute a javascript from within an accordion
<p>I am trying to use jQuery accordion widget. I want to use a common javascript code inside all the accordion section. For e.g I am trying to make a tab view inside every accordion section. The tab view is handled through an external javascript file created by me. Also I am using images slideshow inside every section of the accordion.It works for the a single section only. Whenever i try to paste the same html code in the next section of the accordion , javascript does not execute. The accordion still works. Waiting for your suggestions. </p>

<p>This is the html code</p>

<pre><code>            &lt;div id="contentList"&gt;&lt;h3 class="accHead" onclick="initAll('FoodCheck')"&gt;Food Check&lt;/h3&gt;
        &lt;div class="accContent"&gt;


                    &lt;ul class="menuHoriz"&gt;
                        &lt;li&gt;&lt;a href="#" onclick="setView('what')"&gt;What ? &lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#" onclick="setView('how')"&gt;How ? &lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"  onclick="setView('who')"&gt;Who ? &lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"  onclick="setScreenshotsView()"&gt;Screenshots &lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;



                    &lt;div id="what" class="content"&gt;
                        &lt;p&gt;
                            Details about the projects&lt;br /&gt; What. description
                        &lt;/p&gt;    

                    &lt;/div&gt;
                    &lt;div id="how" class="content"&gt;
                        &lt;p&gt;
                            Details about the projects&lt;br /&gt; How description
                        &lt;/p&gt;    

                    &lt;/div&gt;
                    &lt;div id="who" class="content"&gt;
                        &lt;p&gt;
                            Details about the projects&lt;br /&gt; Who description
                        &lt;/p&gt;    

                    &lt;/div&gt;
                    &lt;div id="screenshots" class="content"&gt;
                        &lt;p&gt;
                            &lt;h2&gt;FoodCheck Snapshots&lt;/h2&gt;
                            &lt;img height="468" width="250" src="images/FoodCheck/Screen_1.png" alt="First screen" id="slideshow" /&gt;
                            &lt;div id="imgText"&gt; &amp;nbsp; &lt;/div&gt;
                            &lt;br clear="all" /&gt;
                            &lt;form action="#"&gt;
                                &lt;input type="button" id="prevLink" value="&amp;laquo; Previous" /&gt;
                                &amp;nbsp;&lt;input type ="button" id="startAgain" value="Start Again"&gt;
                                &lt;input type="button" id="nextLink" value="Next &amp;raquo;" /&gt;
                            &lt;/form&gt;
                        &lt;/p&gt;    

                    &lt;/div&gt;


        &lt;/div&gt;
</code></pre>

<p>This is one of the section of accordion.
There are 3 more such sections. Each section has a Tabs (with id What, who, how, screenshots) in it which are controlled by an external javascript</p>

<p>In </p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(function() {

        //set up the news accordion on the lower page
    $("#contentList").accordion({ header: "h3", collapsible: true});

  });

&lt;/script&gt;
</code></pre>
