Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery Selectors append() in WordPress

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37876

    Hello, Im kind of new to jquery, I am using the css tricks jquery drop down https://css-tricks.com/simple-jquery-dropdowns/ There is a piece of this script appends a couple of arrows to the end of list items that have a drop down. I want to use this but I only want the arrow to be on the second level navigation items. Here is the code modified for what I thought should be my selector, but its not working.

    jQuery(“ul.main_menu.nav li ul li:has(ul)”).find(“a:first”).append(” » “);

    Here is the css path to the second level of the drop down.

    .menu-main-menu-container ul#main_menu.nav li ul.sub-menu li

    I hope all of this makes sense. Any help will be greatly appreciated!

    #102142

    I guess I should have explained better what I want to accomplish. Here is a picture of what I want the menu to look like. I added the arrows manually there. But I need to them be put in dynamically.

    http://www.mylifemore.com/examples/example.png

    #102146
    jamygolden
    Member
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.