I want to apply column-count to an unordered list via JavaScript because I won't know how many columns I need beforehand.
I did the following and this works in Chrome and IE10, but does not work in FireFox and Opera.
var ul= document.getElementById('multi-columns');
ul.style['-moz-column-count'] = 4;
ul.style['-webkit-column-count'] = 4;
ul.style['column-count'] = 4;
I have not tested this in Safari, but I bet it does since it works in Chrome.
Why does not this work in FireFox and Opera? What is a workaround?