refactor(listeners) getLiElement

This commit is contained in:
coderaiser 2014-05-26 03:47:30 -04:00
parent 4217100628
commit 14a7127df7

View file

@ -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;
}