jquery dom problem
<p>I am working on a script that has to build out DOM objects on the fly and I am having some issues with a tabular system that is attached to the injected DOM objects.</p>

<p>When the page is first loaded the first tab is shown and there is a next button. When the user clicks the next button the next step is shown. Well anything after the first step is being built out on the fly but for some reason when I test it out with my tab system the next step does not show.</p>

<p>HTML (first Step):</p>

<pre><code>&lt;div id="trans_modal" class="modal_part grey_modal"&gt;

    &lt;!-- Step 1 --&gt;
    &lt;div class="steps" id="step0"&gt;
        &lt;div class="modal_group english_container"&gt;
            &lt;strong&gt;Original English:&lt;/strong&gt;
            &lt;div class="english_version"&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;% unless @user_settings.google_integration == 0 %&gt;
            &lt;div class="modal_group google_container"&gt;
                &lt;strong&gt;Machine Translation:&lt;/strong&gt;&lt;br /&gt;
                &lt;div class="google_version"&gt;&lt;/div&gt;
            &lt;/div&gt;
        &lt;% end %&gt;
        &lt;div class="modal_group translate_container_1"&gt;
            &lt;strong&gt;Translated Version:&lt;/strong&gt;&lt;br /&gt;
            &lt;textarea class="translate_version" name=""&gt;&lt;/textarea&gt;
        &lt;/div&gt;
        &lt;div class="clear"&gt;&lt;/div&gt;
        &lt;div class="modal_controls single_translation steps" id="step1"&gt;
            &lt;a class="grey_button close_modal close_button" href="#"&gt;&lt;span&gt;Close&lt;/span&gt;&lt;/a&gt;
            &lt;a class="grey_button" href="#" id="transSubmit"&gt;&lt;span&gt;Save and Close&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="modal_controls step_translation"&gt;
            &lt;a class="grey_button close_modal close_button" href="#"&gt;&lt;span&gt;Close&lt;/span&gt;&lt;/a&gt;
            &lt;a class="grey_button next" href="#step1"&gt;&lt;span&gt;Next&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
    &lt;/div&gt;

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

<p>jQuery on-the-fly DOM building:</p>

<pre><code>function buildStepProcess() {
        var tmp = "";
        $.each(childElements, function(i, val) {
            var stepNum = i + 1;
            // tmp += "&lt;!-- Step " + stepNum + " --&gt;";
            tmp += "&lt;div class='steps' id='step" + stepNum + "'&gt;";
                tmp += "&lt;div class='modal_group translate_container_2'&gt;";
                                    tmp += "Original English:&lt;br /&gt;";
                                    tmp += "&lt;div class='translate_construct' id='translate_construct'&gt;&lt;/div&gt;";
                                    tmp += "&lt;/div&gt;";
                                tmp += "&lt;div class='modal_group translate_container_3'&gt;";
                                    tmp += "Complete Version:&lt;br /&gt;";
                                    tmp += "&lt;div class='translate_complete'&gt;&lt;/div&gt;";
                                tmp += "&lt;/div&gt;";
                                tmp += "&lt;div class='clear'&gt;&lt;/div&gt;";
                                tmp += "&lt;div class='modal_controls'&gt;";
                                    tmp += "&lt;a class='grey_button close_modal close_button' href='#'&gt;&lt;span&gt;Close&lt;/span&gt;&lt;/a&gt;";
                                    tmp += "&lt;a class='grey_button next' href='#step" + stepNum + "'&gt;&lt;span&gt;Next&lt;/span&gt;&lt;/a&gt;";
                                tmp += "&lt;/div&gt;";
                                tmp += "&lt;/div&gt;";
                                tmp += "&lt;/div&gt;";
            tmp += "&lt;/div&gt;";
        });

            $('#trans_modal').append(tmp);

            $('.next').livequery('click', function(){
                $('.steps').hide();
                var active = $(this).attr('href');
                console.log(active);
                console.log($(active).text());
                $(active).show();
                return false;
            });
    }
</code></pre>

<p>Sorry if this is confusing. I just can't figure out what I am doing wrong</p>

<p>Thanks!
Dennis</p>
