I am trying to assign an object to another other in jQuery but I am getting error. I am quite new to jQuery so all helps are much appreciated. Following is the code i am trying to do.
while ($(obj)) {
$(obj) = $(obj).children(":first");
}
It is trying to traverse through a table.
$(obj)will always be considered as true, you are doing an infinite loop.At least, you should do
while ($(obj).length), and you can’t assign$(obj).children(":first")to$(obj),$(obj)is not a variable. So maybe what you want to do is like below.