Building dynamic selects with options from a list and I need to add .change to the last select options
===

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.

        
    $(function() {
        renderNextLevel('#something > div > 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 = $('<select />');
                sel.attr('class', 'sel' + height);
                sel.attr('id', 'sel' + height);
                $('#something').append(sel);
                fopt =  $("<option />", {
                    "value"   : "",
                    "text"    : "Go to...",
                }).appendTo(sel);
        
        
                var nextLevel = function(text, idx) {
                    var parents = $({});
                    $('#something select').each(function() {
                        if($(this).index() > 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 = $('<option />');
                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);
                }
            });
        });
     }


I now need the last select box options to go to a URL when selected. 

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

But it's not working. any help?