Building dynamic selects with options from a list and I need to add .change to the last select options
<p>I had someone help me and he came up with this, which works great. It builds 3 dynamic select filter with options from a UL.</p>

<pre><code>$(function() {
    renderNextLevel('#something &gt; div &gt; div');
});

function renderNextLevel(parent) {
    $(parent).children('ul').each(function() {
        var height = $(this).parentsUntil('#something').length;
        var current = $(parent).children('ul');
        var sel = $('.sel' + height);
        if (sel.length == 0) {
            sel = $('&lt;select /&gt;');
            sel.attr('class', 'sel' + height);
            sel.attr('id', 'sel' + height);
            $('#something').append(sel);
            fopt =  $("&lt;option /&gt;", {
                "value"   : "",
                "text"    : "Go to...",
            }).appendTo(sel);


            var nextLevel = function(text, idx) {
                var parents = $({});
                $('#something select').each(function() {
                    if($(this).index() &gt; idx){
                        $(this).remove();
                    }
                });

                $('#something').find('li a').each(function() {
                    if ($(this).text() == text) {
                        parents = parents.add($(this).parent());
                    }
                });
                renderNextLevel(parents);
            };

            sel.change(function() {
                 nextLevel(sel.find('option:selected').text(), sel.index());
            });
        }

        $(this).children('li').each(function() {
            var opt = $('&lt;option /&gt;');
            var link = $(this).children('a');
            var optVal = link.attr("href");
            var optText = link.text();
            if (sel.find('option[name="' + optText + '"]').length == 0) {
                sel.append(opt);
                opt.attr('value', optVal);
                opt.attr('name', optText);
                opt.text(optText);
            }
        });
    });
 }
</code></pre>

<p>I now need the last select box options to go to a URL when selected. </p>

<pre><code>$("#something select").change(function() {
    window.location = $(this).find("option:selected").val();
 });
</code></pre>

<p>But it's not working. any help?</p>

<p>DEMO <a href="http://jsfiddle.net/qjWH7/6/" rel="nofollow">http://jsfiddle.net/qjWH7/6/</a></p>
