How can i use two different methods in jQuery?
<p>I am trying to have append and show methods if a check box is checked, problem is that both the methods do not work at the same time.It shows either the div or append the table.How can i have both the table and div if the check box is checked?</p>

<p>here is the code:</p>

<pre><code>&lt;input type="checkbox"  name="want_nl" id="want_nl" value="newsletters" /&gt;age

&lt;div id="div1" class="tb" style="background-color:#0099CC"&gt;your img here&lt;/div&gt;

&lt;table cellpadding="0" cellspacing="0" border="1" width="100%"  id="newsletters"&gt;&lt;/table&gt;

$(function(){
$("input[name=want_nl]").click(function(){
        if ($(this).is(":checked"))
        {

            $('#newsletters').append('&lt;table id="newsletter_types"&gt;&lt;/table&gt;');
            $('#newsletter_types').append('&lt;tr&gt;&lt;td colspan="3" &gt;&lt;strong&gt;Optioneel&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;');
            $('#newsletter_types').append('&lt;td valign="top"&gt;Zoet-houdertje Chocolade lollys&lt;/td&gt;');
            $('#newsletter_types').append('&lt;td valign="top" &gt;15 stuks a &amp;euro; 22,50&lt;/td&gt;');
            $('#newsletter_types').append('&lt;td valign="top"&gt;uuu&lt;/td&gt;&lt;/tr&gt;');
            $('.tb').show();
        }
        else

            $("#newsletter_types").remove();
            $('.tb').hide();
    });

}); 
</code></pre>
