0

I am applying Superfish to a menu, but only one top-level LI actually requires it, I would prefer the other LI items not to have it!

Since wordpress PHP is generating the source I thought of one way to do it - just use JQuery to remove any UL inside the other top-level LI items.

$('#navmain > li').each(function(index) {

    if($(this).attr('id' ) !== 'menu-item-14') {
        $(this).find('ul').remove();
    }
});

Is there a better way with Superfish however? i.e. a callback perhaps where I can pass it the LI id of the one I want to dropdown?

Luke Barker
  • 915
  • 7
  • 14
  • 1
    Can you make an example in jsfiddle of your code? –  Jul 06 '12 at 10:56
  • I think my method is correct actually, just to remove with jQuery the other sub-menus. Superfish is JQuery anyway so it solves it. My code is simply a standard output of a main-menu from Wordpress ul > li > ul > li etc. – Luke Barker Jul 06 '12 at 11:46

0 Answers0