0
我試圖添加和使用下面的腳本刪除類#menuElem標籤不適用?CSS類節點
看到我們所添加的類HTML的下方,你可以找到menuElem的HTML
<!-- Header zone -->
<!-- header -->
<div class="tenantHeade fs-headerfooter-widget">
<!---->
<header>
<div id="container" class="container">
<div class="logocont"><a href="/" class="logo">website</a></div>
<!-- Mobile nav btn -->
<a class="nav-toggle" href="javascript:void(0);"><span class="ada-compliant visible-xs"></span></a>
<!-- Mobile user options (for anon and preferred visitors) -->
<a href="javascript:void(0);" class="member-toggle">
<span class="ada-compliant visible-xs"></span>
</a>
<!-- Main nav -->
<nav class="main-nav inactive">
<ul id="menuElem">
<li>
<a href="https://www.website.com/FareFinder/DeepLinkSearch/?SearchFrom=browseexperiences&TravlePeriod=12&AdultCount=2"><span class="antiskew">Browse Experiences</span></a>
<ul>
<li>
<a href="https://www.website.com/FareFinder/DeepLinkSearch/?SearchFrom=website&amp;TravlePeriod=12&amp;AdultCount=2">website</a>
</li>
<li>
<a href="https://www.website.com/local">Local</a>
</li>
<li>
<a href="https://www.website.com/https://www.website.com/FareFinder/DeepLinkSearch/?SearchFromType=theme&SearchFrom=voluntours&TravlePeriod=12&Keyword=voluntours&AdultCount=2">Voluntours</a>
</li>
<li>
<a href="https://www.website.com/https://www.website.com/FareFinder/DeepLinkSearch/?SearchFromType=theme&SearchFrom=welcomewebsite&TravlePeriod=12&Keyword=welcome+website&AdultCount=2">Welcome website</a>
</li>
</ul>
</li>
<li>
<a href="https://www.website.com/Marketing/becomemember"><span class="antiskew">Become a Member</span></a>
</li>
<li>
<a href="https://www.website.com/Marketing/becomemember"><span class="antiskew">Daily Deals</span></a>
</li>
</ul>
不工作,我們可以使用正則表達式來做到這裏面? – SmartestVEGA
@SmartestVEGA更新了可能對你有幫助的代碼 – Sagar
沒有好運的伴侶,我懷疑我確實在$('#menuElem> li> ul')中獲得節點 – SmartestVEGA