i am facing a problem when am trying to bind a array with the ids of my div’s i wanted to bind them in order of their appearance staring with first to last..
The code:
i=1;
$('.hiddenvalue').each(function(){
arrayinit[i] = $(this).attr("id");
i++;
});
but its binding in any random order, why is it so? any suggestions?
does this give you the same results ?
I’m not sure it’ll change the order, i think the order is more the same as it appear in the DOM tree does your .hiddenvalue divs appear in the correct order in the DOM tree ?