Convert UL to dropdown list not working

@CharlieJustUs when you use Fiddle is automatically sets the $ variable for you. When your script tries to run on your site, that variable is not set, and it fails.

Try this please.

jQuery(document).ready(function($) {
    $(function() {
        $('ul.clearfix').each(function() {
            var $select = $('<select class="dropdown-toggle" />');
            $(this).find('a').each(function() {
                var $option = $('<option />');
                $option.attr('value', $(this).attr('href')).html($(this).html());
                $select.append($option);
            });
            $(this).replaceWith($select);
        });
    });

    // This will grab the value the select is being set to and redirect to the link
    $('select.dropdown-toggle').on('change', function(){
       window.location.href = $( this ).val();
    });
});

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)