mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(listeners) getLiElement
This commit is contained in:
parent
4217100628
commit
14a7127df7
1 changed files with 3 additions and 7 deletions
|
|
@ -218,13 +218,9 @@ var Util, DOM, CloudCmd;
|
|||
}
|
||||
|
||||
function getLIElement(element) {
|
||||
var tag = element.tagName;
|
||||
|
||||
if (tag !== 'LI')
|
||||
do {
|
||||
element = element.parentElement;
|
||||
tag = element.tagName;
|
||||
} while(tag !== 'LI');
|
||||
if (element)
|
||||
while (element.tagName !== 'LI')
|
||||
element = element.parentElement;
|
||||
|
||||
return element;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue