Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i = 0; i < window.dropdowns.length; i++) {
- var e = window.dropdowns[i];
- if ($(event.target).closest('.active').length == 0) {
- e.hideList();
- }
- }
- for (var i = 0; i < window.dropdowns.length; i++) {
- var e = window.dropdowns[i];
- var parent = event.target.parentElement;
- while (parent.tagName != 'BODY') {
- if (parent.className.indexOf('active') > 0) {
- e.hideList();
- break;
- }
- parent = parent.parentElement;
- }
- }
- //First while loop
- console.time(firstWhileLoopInFunction)
- console.timeEnd(firstWhileLoopInFunction)
- //Second while loop
- console.time(secondWhileLoopInFunction)
- console.timeEnd(secondWhileLoopInFunction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement