Reputation: 5437
I am unable to figure out how to reload the <ul>
and <li>
after the page was loaded.
I have <li>
object which changes after getting ajax data and if I try and change the DOM using jQuery it changes but when Dropotron opens it shows only the old data.
Has anyone knows how to solve it ?
(I even tried to reload the whole navigation element $('#nav > ul').dropotron({});
but it adds another dropotron menu over it)
Upvotes: 0
Views: 164
Reputation: 5437
I think I found a workaround of my issue, At the initialization of the navigation object I have changed the two parameters: detach, cloneOnDetach to false to false and I was able to change them later in code
I would like to understand what those two parameters mean and what is the disadvantage of changing them to false
$('#nav > ul').dropotron({
mode: 'fade',
speed: 300,
alignment: 'center',
noOpenerFade: true,
detach: false,
cloneOnDetach: false
});
Upvotes: 1