Search code examples
javascripthtmlgetuikitriot.js

How to keep nodes inside initial container in UIKit3


I have used RiotJS with Bootstrap before, now I have a project with UIKit. A big advantage of riotjs tags is, that they remain as custom tag nodes in the DOM, thus one can use their names as a selector. If I create a modal inside a tag with Bootstrap, its elements stay inside the tag.

But with UIKit I see that my elements are moved out from their original DOM location to the top level (as last under body). Is there any parameter or even better a global setting to stop UIKit doing this?


Solution

  • The documentation contains something about a container named attribute. I could not manage to get it working with a selector provided in it, but setting it to false leaves my DOM unaltered. Which is what I needed. Would be great to have a global setting for that, but I can live without...