dynamic accordion
===

I have a question about a jQuery Accordion.

The Accordion is setup kinda funky.

Looks like this:

Accordion header
<br>
Form pieces

Accordion header
<br>
Form pieces

Accordion header
<Br>
Form pieces

What I am trying to do is change an Accordion header (and info that shows when u click the header) based upon the previous form input.
That works, except that the it does show as an Accordion header (so basically it loses the jQuery UI accordion part and just displays as a link with the text that would normally drop down when you click the accordion).

Here is some code:





In the main html doc



    <script type="text/javascript">
        jQuery(function(){
        // Accordion
        //initialize accordion       
         
        jQuery("#jQueryUIAccordion").accordion({ 
            header: "h3",
            animated: "",
            event: "click",
            collapsible : true,
            autoHeight: false,
            navigation: true,
            active: false 
        }); 
        //set accordion header options
        jQuery("#jQueryUIAccordion").accordion("option", "icons",
          { 'header': 'ui-icon-triangle-1-e','headerSelected': 'ui-icon-info' });
        }); 
    </script>
        
    <div class="container fontClassBody paddingLeftBody">
        <div class="row">
            <div class="left">
                <div id="starting_type_in">
                    <select name="Start" onchange="choiceStart(this.form);">
                        <option value=""></option>
                        <option value="Current Limit">Current Limit</option>
                        <option value="Soft Start">Soft Start</option>
                    </select>
                </div>
            </div>
        </div>  
    </div>

 
                
                
*****this is what needs to change based on the above********


    <div>
        <div id="current_torque"><h3><a href="#">Torque/Current %</a></h3>
            <div>This represents the level of current that will be allowed during the start.This is only active when a current limit mode is selected and is programmable as allowed by the product selected. 
                 Since most designs are based in historical references the best place to start an analysis is with 350% current limit, which produces a torque equivalent to a star-delta type historical reduced voltage starting method.
            </div>
        </div>
    </div>

  





****This is how the form input changes the next accordion header (in a separate javascript file)*********



    function setCurrentTorque() {
        var cur_trq = "";
        if (start_type === "Current Limit") {
            cur_trq = "<h3><a href='#'>Initial Current %</a></h3><div>This represents the level of current that will be allowed during the start. This is only active when a current limit mode is selected and is programmable as allowed by the product selected. Since most designs are based in historical references the best place to start an analysis is with 350% current limit, which produces a torque equivalent to a star-delta type historical reduced voltage starting method. </div>"; 
         } else if (start_type === "Soft Start") {
         cur_trq = "<h3><a href='#'>Initial Torque %</a></h3><div>This represents the initial level of torque that will be applied to the motor at zero speed. This value will increase as the voltage is ramped during the start time. This value is only active when a soft start mode is selected and is programmable as allowed by the product selected. A default setting of around 70% is a good place to start with the estimation.</div>";
         } else {
         cur_trq = "<h3><a href='#'>Torque/Current %</a></h3><div> Initial Current %: <br />This represents the level of current that will be allowed during the start. This is only active when a current limit mode is selected and is programmable as allowed by the product selected. Since most designs are based in historical references the best place to start an analysis is with 350% current limit, which produces a torque equivalent to a star-delta type historical reduced voltage starting method.<br /><br /> Initial Torque %: <br />This represents the initial level of torque that will be applied to the motor at zero speed. This value will increase as the voltage is ramped during the start time. This value is only active when a soft start mode is selected and is programmable as allowed by the product selected. A default setting of around 70% is a good place to start with the estimation.</div>"; 
        }
         document.getElementById('current_torque').innerHTML = cur_trq;
        }
    }

I hope this enough info to get you all crackin'. I think I guess I am trying to do some kinds of jQuery refresh, but I don't know how to implement this, trying to take care for a previous interns work, and I have never used jQuery until now.

Thanks so much,

randomtechdude