我想将切换器添加到以下代码:
<div class="z100" id="category-sidebar">
<h3 class="header">
<a class="header" href="/shop/us/en/#">
<span>The Latest</span>
</a>
</h3>
<ul class="show-more limit-10" style="display: block;">
<li class=" first">
<a href="/shop/us/en/mens/new-arrivals"><span>New Arrivals</span></a>
</li>
......
</ul>
<h3 class="header">
<a class="header" href="/shop/us/en/#">
<span>The Latest</span>
</a>
</h3>
<ul class="show-more limit-10" style="display: block;">
<li class=" first">
<a href="/shop/us/en/mens/new-arrivals"><span>New Arrivals</span></a>
</li>
......
</ul>
......
</div>
我试过
$("./ul"){
attribute("data-ur-toggler-component","content")
attribute("data-ur-state","disabled")
wrap("div",data-ur-set: "toggler",data-ur-state: "disabled"){
insert_top("div",class:"cat-header",data-ur-toggler-component:"button",data-ur-state:"disabled"){
move_here("../h3/a","top") {
name("div");
attribute("href","")
}
}
}
}
但无法将切换器标题移动到正确的位置。