grakovski 0 Light Poster

Hello.
I have one problem with only one text witch shows two times (i want only once)
Here is picture:
http://i.imgur.com/cfOrBCs.png

Maybe the for cycle loops this text and...this is happen.

I want to show only once in the middle.
Here is code:

     var matchcount = 4;
     $.ajax({
        type: 'GET',
        url: 'http://counter-strike.net/jsfeed/gosumatches',
        dataType: 'json',
        cache: true,
        data:
        {
           'count': matchcount
        },
         success: function(data) 
         {
           var html = '';
           for ( c = 0; c < matchcount; c++ )
           {
              m = data[c];
              html += '<div class="upcomingmatch">';   
              html += '<b>'+m.name+'</b>';
              html += '<div class="um_time">'+m.time+'</div>';
              for ( i = 0; i <= 1; i++ )
              {
                 t = m.teams[i];
                 html += '<img class="um_flag'+i+'" alt="" src="http://cdn.steamcommunity.com/public/images/countryflags/'+t.country+'.gif"> ';
                 html += ''+t.name+'';


                 html +=' vs. ';

              }
              html += '</div>';      
           }
           $('#sidebar_upcoming #upcomingmatches').html(html);
         }
     });

HTML:

<div id="sidebar_upcoming">
<div id="upcomingmatches" class="sidebar_content">
</div>
</div>

Thanks for any help :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.