Hi
I am really not good with javascript but I have a script that retrieves a list of state names with this code:
map.objectList = new AmCharts.ObjectList("listdiv");
Apparantly it is withouth any format retrieved in a UL LI format.
I need to "catch" this list (I know it has 51 names) and display it in columns with CSS.
I was able to find some similar code, but I am not sure as to how to use it. The #listdiv refers to my CSS div.
// generate list
var cnt = AmCharts.maps.usaLow.svg.g.path.length;
var brk = Math.ceil(cnt / 2);
var i = 0;
$(AmCharts.maps.usaLow.svg.g.path).each(function () {
var col = i > brk ? 2 : 1;
$('#listdiv #col'+col).append('<label><input type="checkbox" value="'+this.id+'" onclick="updateMap();" /> <span>'+this.title+'</span></label><br />');
i++;
});
/* end of list */
I tried css:
<div id="listdiv">
<div id="col1" class="col"></div>
<div id="col2" class="col"></div>
</div>
I really need help because I do not want a longgggg list with scroll bars. How do I do this?