css - Can't figure out the jQuery selector -


So basically I try to maintain the image of upper level categories of a down arrow while hovering over the elements of submenu I am doing I want to do this through a hover function on jQuery, but for that I can not get a selector to target sub menu items.

Here's the code that I'm trying to run:

  $ (document) .ready (function () {$ ('. Sub al & gt; 'Hover' (function () {$ (this) .parents ('a.sub'). Attr ('Src', 'images / DownArrow.png')}}, function () {$ (this) .parents ('A.sub'). Attr ('src', 'images / DownArrowOff.png');});});  

On this drop down menu:

But as I said I can not understand the selector to target those submenu items I can change src for image.

It should be done through CSS, not through CSS (I believe that I know that it works, but the way I have to complete this task)

Thanks for any and all help.

-Seth

I think the images are added to the fly , By them being found by jQuery. Unless you force events with live , I think they disappear.

He said, how did I get it to work.

  $ (document) .ready (function () {var downArrow = '/Test/images/DownArrow.png'; var down arrowoff = '/ test / finance / down arrowoff.png'; $ ("Src", "arrow");}, 'function'), function () {$ (this) .find ('img') .rr ('src', down arrowoff);} ; $ ("# Menu li ul"). Hover (function {$ (this) .parents ('li: is (a)'). Children ('a.sub'). ARTR ('SRC', down arrow);}, function () {$ ( This is) .Prints ('Lee: is (A)'). Children ('a.sub'). 'IMG'). Etter ('src', down arrowoff);});});  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -