J
jquertil
Hello,
I have this snippet of code which works fine, but it seems like I
should be able to combine this into a single while loop, no?
while (fobj.tagName != topelement && fobj.className != "dragme"){
fobj = nn6 ? fobj.parentNode : fobj.parentElement;
}
while (fobj2.tagName != topelement && fobj2.className != "draggerix")
{
fobj2 = nn6 ? fobj2.parentNode : fobj2.parentElement;
}
I tired this version but that broke the function.
while ((fobj.tagName != topelement && fobj.className != "dragme")
&&(fobj2.tagName != topelement && fobj2.className !=
"draggerix")){
fobj2 = nn6 ? fobj2.parentNode : fobj2.parentElement;
fobj = nn6 ? fobj.parentNode : fobj.parentElement;
}
I have this snippet of code which works fine, but it seems like I
should be able to combine this into a single while loop, no?
while (fobj.tagName != topelement && fobj.className != "dragme"){
fobj = nn6 ? fobj.parentNode : fobj.parentElement;
}
while (fobj2.tagName != topelement && fobj2.className != "draggerix")
{
fobj2 = nn6 ? fobj2.parentNode : fobj2.parentElement;
}
I tired this version but that broke the function.
while ((fobj.tagName != topelement && fobj.className != "dragme")
&&(fobj2.tagName != topelement && fobj2.className !=
"draggerix")){
fobj2 = nn6 ? fobj2.parentNode : fobj2.parentElement;
fobj = nn6 ? fobj.parentNode : fobj.parentElement;
}