[Fixed] Using Horizontal Drop-Down Menu Tympanus Codrops

[Fixed] Using Horizontal Drop-Down Menu Tympanus Codrops

Dear Friends,

Just new to the forum. Not newbie in jQuery, however, also not expert. :)

I'm trying to use thie Horizontal Drop-Down Menu ( http://tympanus.net/codrops/2013/03/05/horizontal-drop-down-menu/), however I'm having a bit of a trouble.

When adding the menu content dynamically, the sub-menu items will not be shown.

If I copy the code generated and paste it in the HTML directly, it will work just fine.

Am I missing something? Do I need to call any 'reloader'?

Can you give me a hand?

Thank you.

== AJAX CALL BELOW =================
  1. $.ajax({
                    type: 'GET', url: url, async: false, jsonpCallback: 'callback', contentType: "application/json", dataType: 'jsonp',
                    success: function (data) {

                        if (data != undefined) {
                            var strMenu = "<li><a href=\"#\">SENHORA</a><div class=\"cbp-hrsub\"><div class=\"cbp-hrsub-inner\"><div>";
                            strMenu = strMenu + "<h4>CATEGORIA</h4>";
                            strMenu = strMenu + "<ul>";

                            $.each(data.menu, function (i, item) {
                                strMenu = strMenu + "<li><a href=\"#\">" + item.descricao + "</a></li>";
                            });
                            strMenu = strMenu + "</ul></div></li>";
                            $('#menuPrincipal').append(strMenu);
                        }
                    },
                    error: function (e) {
                        $('#divAlertas').append("<div class=\"alert alert-danger\" role=\"alert\"><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>&nbsp;<a href=\"#\" class=\"alert-link\">Erro encontrado ao carregar as cores! - " + JSON.stringify(parsedjson) + " - Por favor informe o suporte.</a></div>");
                    }
                });
======================================