I am trying to dynamically load the contents in the dropdown. But using data-dropdown, the dropdown is showed before the content is loaded. I thought alternative way is to use a different data attribute and call the dropdown programatically.
<a class="dataTrigger" href="#" data-menu="#dropdown1">Menu</a>
<div id="dropdown1">
//contents here
</div>
$('.dataTrigger').on('click', function () {
var dtval = $(this).attr('data-menu');
$(dtval).dropdown('show');
});
But it does not load the dropdown. Is this possible?
I am trying to dynamically load the contents in the dropdown. But using data-dropdown, the dropdown is showed before the content is loaded. I thought alternative way is to use a different data attribute and call the dropdown programatically.
But it does not load the dropdown. Is this possible?
Thank you.