Why my listview style change when I loop the javascript twice?
I can't see anything wrong with your code in terms of why it gives you different styles. I would however ensure you have a consistent coding standard.

For example my coding standards usually include:


Always declare variables. Variable maks is never declared here (I'm going to assume it is never declared.) Change it to var maks = -1;
Always use { and }. This will ensure you don't screw up a block. 

if(data[result][i].bulan &gt; maks) 
    maks = data[result][i].bulan;


would become:

if(data[result][i].bulan &gt; maks)
{
    maks = data[result][i].bulan;
}


Its just proofing for us who make mistakes from time to time.
make local variables where possible

if (resultArray[i].bulan === bulanVal &amp;&amp; !types[resultArray[i].type]) {
    types[resultArray[i].type] = true;
    count++;
}


could be:

 var current = resultArray[i];
 if (current.bulan === bulanVal &amp;&amp; !types[current.type]) {
    types[current.type] = true;
    count++;
}


It means less look ups. Most of the time its easier to read.