I'm trying to use for..in loop to select the objects within a variable and it doesn't show up the necessary Li objects.
var mUlLi = $(mUl).find('>li'); //select all li's in main Ul
var listLength = $(mUlLi).length;
if(listLength >0 ){
/*for(i=0;i <listLength; i++) {
console.log(mUlLi[i]); // works fine show the li objects
}*/
for(var obj in mUlLi) {
console.log(obj); // show's diff objects
}
}
How can i fix this ?
for/in.