WordPress.org

Ready to get started?Download WordPress

Forums

wp_nav_menu and dropdown menu items? (1 post)

  1. rcwatson
    Member
    Posted 3 years ago #

    Is it possible to insert onmouseover and onmouseout events via the wp_nav_menu menu insertion function?

    For example, I'd like to take this wp_nav_menu generated code:

    <li id="menu-item-77" class="menu-item menu-item-type-post_type menu-item-77"><a href="http://example.com/blog/?page_id=16">News</a></li>

    and insert onmouseover/onmouseout like this:

    <li id="menu-item-77" class="menu-item menu-item-type-post_type menu-item-77"><a href="http://example.com/blog/?page_id=16" onmouseover="mopen('m2')" onmouseout="mclosetime()">News</a></li>

    Is that supported somehow in the args passed to wp_nav_menu? I've read the Codex, but can't wrap my head around how to do this.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic