hello guys, I use django template to generate a HTML like this:

        {% for type in types %}
        <tr id="list_{{type.id}}" class="itemrow">
          <td width="70" align="middle" class="list_typename">
{{type.name}}</td>
        </tr>
        {% endfor %}

typeid increases from 1 by 1.

I use class traverse to get the sequence of the list:

  sendstr = "";
  $(".itemrow").each(function(index, value) {
    type = $(this).attr('id').substring(5);
    sendstr += type;
   });

I expect sequence to be like 12345, but the result is 13254. I'm
confused.

Can anyone help me. Thanks

Reply via email to