From 37bc2311ca9adceaf26287f2ca2760a13016c22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Mon, 18 Jul 2022 00:00:49 +0800 Subject: [PATCH] update --- src/modules/element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/element.js b/src/modules/element.js index 7fb8011a..c5c77f94 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -131,9 +131,9 @@ layui.define('jquery', function(exports){ ,filter = parents.attr('lay-filter'); if(li.hasClass(THIS)){ - if (li.next()[0] && li.next()[0].tagName === 'LI'){ + if (li.next()[0] && li.next().is('li')){ call.tabClick.call(li.next()[0], null, index + 1); - } else if (li.prev()[0] && li.prev()[0].tagName === 'LI'){ + } else if (li.prev()[0] && li.prev().is('li')){ call.tabClick.call(li.prev()[0], null, index - 1); } }