How can i pass checkbox data to Textarea using javascript
<p>This is my javascriptcode</p>

<pre><code>function AddContactPhoneNo()

{ 

    $("input[name='contact_id[]']:checked").each(function(){

        var opt_value = $(this).parent().parent().children('.contacts_firstname_01_contacts').text();
        var opt = "&lt;option value='" + opt_value + "'&gt;" + opt_value + "&lt;/option&gt;";
        if  (opt_value != "")
        {
             alert(opt_value);
        }
    });}
</code></pre>

<p>This is my HTML Code</p>

<pre><code>&lt;div class="contacts_headings_01"&gt;
                                        &lt;div class="contacts_checkbox_01"&gt;&lt;input name="contact_id[]" id="contact_id" type="checkbox"  value="'.$contacts_row['contact_id'].'" style="margin-top:0px ; margin-left:-3px;" /&gt;&lt;/div&gt;
                                        &lt;div class="contacts_firstname_01_contacts"&gt;'.$firstname.'&lt;/div&gt;
                                        &lt;div class="contacts_firstname_01"&gt;'.$lastname.'&lt;/div&gt;
                                        &lt;div class="contacts_firstname_01"&gt;'.$company.'&lt;/div&gt;
                                        &lt;div class="contacts_group_01_contacts_page"&gt;'.$groups1.'&lt;/div&gt;
                                        &lt;div class="contacts_firstname_01_contactdateofbirth"&gt;'.$birth_date.'&lt;/div&gt;
                                        &lt;div class="contacts_gender_01"&gt;'.$gender2.'&lt;/div&gt;
                                        &lt;div class="ncontacts_mobile_nmbr_01"&gt;'.$phone1.'&lt;/div&gt;
                                    &lt;/div&gt;
</code></pre>

<p>I Got Error like This</p>

<pre><code>$ is not defined

$("input[name='contact_id[]']:checked").each(function(){
</code></pre>
