WordPress.org

Support

Support » Themes and Templates » navigation bar parent elementselection

navigation bar parent elementselection

  • I was wondering. if when i use
    wp_nav_menu( array( ‘depth’ => 3, ‘sort_column’ => ‘menu_order’, ‘container’ => ‘ul’, ‘menu_id’ => ‘main-nav’, ‘menu_class’ => ‘nav fl’, ‘theme_location’ => ‘primary-menu’ ) );

    we all come out the same html.

    if so, how could we use JQuery to select the li that is a parent??

    because after the html i can’t seems to select the one.
    —————–Output HTML—————-
    <ul id=”main-nav” class=”nav fl”><li id=”menu-item-84″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-84 parent”>User_home
    <ul class=”sub-menu”>
    <li id=”menu-item-83″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-83″>User_message
    <li id=”menu-item-86″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-86 parent”>My_Home
    <ul class=”sub-menu”>
    <li id=”menu-item-88″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-88″>[Photos]
    <li id=”menu-item-89″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-89″>[About]

    ——————————————–
    ————–Js—————————-
    $(“.parent”).hover(
    function () {
    alert(“parent!”);
    },
    function () {

    }
    );
    ——————————————–

    this does not work~~~~~ HELP~~~~~~~~~~~~~~~~~~~~~

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘navigation bar parent elementselection’ is closed to new replies.
Skip to toolbar