mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Use a do-while statement to reduce redundant code
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
b26c34a69f
commit
38fe2deab5
@ -175,11 +175,10 @@ function isDisconnected( node ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sibling( cur, dir ) {
|
function sibling( cur, dir ) {
|
||||||
|
do {
|
||||||
cur = cur[ dir ];
|
cur = cur[ dir ];
|
||||||
|
} while ( cur.nodeType !== 1 );
|
||||||
|
|
||||||
while ( cur.nodeType !== 1 ) {
|
|
||||||
cur = cur[ dir ];
|
|
||||||
}
|
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user