You can clone with
dynamic Text justification in image list does not work and always shows the content center aligned.
var categoryList = document.createElement('div');
var header = document.createElement('div');
header.innerHTML = 'Categories';
Where are you running this code? before or after the DOM is loaded?
the code is running after dom is loaded. As The List appears OK with the exception of title being center aligned instead of left-aligned
In your code example, I don't see where you are calling bb.imageList.style()
Are you able to post the full code you are using?
categoryContainer = document.createElement('div');
I just added categoryList = bb.imageList.style(categoryList); gives error under debug mode TypeError: 'undefined' is not a function (evaluating 'bb.imageList.style(avatarContent)') and the list will not show up. This is all being done before loading of DOM.
You don't want to do an apply and a style, only style. The apply function was never intended to be public.
if bb.imageList.apply([categoryList]); is not used the list does note show. Moreover, I have also tried the style only option as well with no results. I am usin 0.9.6 beta release of BBUI
Ah ok.. so I was mistaken in thinking that the style function had been added to the image list as recorded in issue #445
There currently isn't a good way to create an image list on the fly and then add it into the DOM. You can however have an empty image list and then refresh its items as shown in the following sample.
This should be made available with issue #445. I'm going to close this issue as a duplicate.