As far as I can see, you are creating a new UL element so you will need to call $.SmartMenus.Bootstrap.init();
after this line:
$(jqMenuId).empty().append('<ul id="bsMenu" class="nav navbar-nav">' + liHtml + '</ul>');
If you are getting the “$.SmartMenus.Bootstrap is undefined” error message, then you are either not using the latest dev versions of “jquery.smartmenus.js” and “jquery.smartmenus.bootstrap.js” from https://github.com/vadikom/smartmenus, or you have not linked properly the “jquery.smartmenus.bootstrap.js” file on your page, so you may want to check these.
If you are still having troubles, please post some kind live demo that I could test because it’s difficult to guess what exactly might be wrong without being able to look at your code.