Exclude div jQuery -
<li id="menu-item-43" class="menu-item menu-item-type-custom menu-item-object-custom"> <a href="#"> <cufon class="cufon cufon-canvas" alt="jeden" style="width: 33px; height: 12px;"> <div class="menu-button-desc" style="padding-left: 3.80049px;"></div> </a> </li>
spec.find($(".sub-menu li:not(:contains('pic-sub'), :contains('title-sub'), div.menu-button-desc)")).clone().prependto("#sub-menu ul");
i need exclude div.menu-button-desc. else works fine. i'm doing wrong...
when select #menu-item-43 element, has div.menu-button-desc child. want clone whole node, drill down element want gone, .remove() it, .end() cloned element without "problem child".
you have funky things going on w/ combining .find , toplevel selector ($()), , think selector string not doing anything. don't want selector have logic, it's starting point traversing , manipulating. here's best guess you're going for:
spec.find(".sub-menu li").clone() .find(".menu-button-desc").remove() .end().prependto("#sub-menu ul");
Comments
Post a Comment