are you sure that the <tr> IDs are being rendered in the right order? View source to double check. If they are correct in the html, could you point us to a test page where you're experiencing the problem?

thanks,

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 15, 2009, at 3:47 AM, elprup wrote:

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