jquery uncertain error?
<p>i am using this code to access all the hidden elements from a form:</p>

<pre><code>function get_hidden_val(ids,form_id)
{

    var get_check_val = document.getElementById(ids);
    if(get_check_val.checked){

    var div = $('&lt;div&gt;&lt;/div&gt;')
    .appendTo('form#bulk_add_cart')
    .attr('id',"bulk_"+form_id)

    $("form#" +form_id).find('input[type="hidden"]').each(function(){  
    var value =$(this).val();
    var name = $(this).attr("name");
    var tags = "&lt;input type='hidden' value='" + value + "' name='"+name+"'&gt;";
    $('div#' +form_id).append(tags);
}); 
}
    else
    {
        $("form#bulk_add_cart").find('div#' +form_id).remove();
    }

}
</code></pre>

<p>My problem is when I click the first checkbox it give me the result but when i click the second checkbox it doesn't and also the another problem is when i click first checkbox it shows total hidden elements but when i second time checked it, it show 4 less ?</p>

<p>Please suggest a solution.</p>

<p>Thanks </p>
