Unable to add options in a listbox using JQuery in IE however works fine in firefox
<p>I have a small JQuery code to Populate/Filter a list box based on a drop down value. However its working fine in Firefox but throws invalid argument error when adding option to list box at following line of code in IE9.</p>

<pre><code>catvalues.add(el);
</code></pre>

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

<pre><code>var names = $('#names');
$('select[title="Category possible values"] &gt; option').appendTo('#names');
var catvalues =$('select[title="Category possible values"]')[0];

$('select[title="ProductName"]').change(function() {

    var val = $(this).children("option:selected").text();  
    $('select[title="Category possible values"]').empty();
    var opts=names.clone();
    opts.children().each(function(idx, el) {
        if (el.text.indexOf(val) &gt;= 0)
        {
            catvalues.add(el);
        }
   });
});
</code></pre>
