I need to pull the submenu under the last element
"inside" the box but ONLY when it's using the widescreen
menu. To do that I need to grab the last element in the navigation,
the submenu under it and then calculate how much the submenu needs to
be pulled to the left. That I have no problem doing. My problem is I
can't seem to isolate ONLY the navigation element in ONLY the
#top-menu ul.
The first step was just to isolate the last child element in the
navigation. I'm stymied at the first step which is to isolate JUST
that one element.
[code]
jQuery('#top-menu > li:last-child').addClass('targetThisHere');
jQuery('#top-menu
li.targetThisHere').css('backgroundColor','purple');
// just to display
[/code]
For the moment, I've colored it purple to make sure I've
grabbed the correct element. On the surface, everything looks fine.
The problem is that if you collapse the screen size and the smaller
screen "hamburger" appears, the menu for the smaller screen
becomes available.
If you click the menu open with the hamburger, you'll notice
that the new class has been added to THIS last-cihild element even
though it's NOT part of the #top-menu element. The id for this
element is #mobile_menu. I can't
figure out why the class is being added to this element. I
definitely don't want it to be.
Anyone have any ideas?