Simple jQuery rollover killin me !!

I have a simple rollover that I can't seem to get right.
I need to change the background image of a child object.

here's the html/php:
<div id="menuBoxContent" alt="navigation">
						//get list of available icons from database
							if($i%8==0){ echo "<div id=\"menuOptionRow\">"; }
					?>  <div id="menuOption" alt="parent">
								<div id="menuOptionIcon" alt="icon"></div>
								<div id="menuOptionTitle"><?php echo $iconTitle;?></div>
					<?php if($i%8==0){ echo "</div>"; }} ?>

Open in new window

here's the jQuery:
<script type="text/javascript">

//Menuoption rollover


Open in new window

I have to use the $(this) selector bc there could be many iterations of the div 'menuOption'.

When someone rolls over the div 'menuOption', I need to change the background image of the child object 'menuOptionIcon'

I just cant seem to figure out the proper use of the .children() method ..

TIA Experts !!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

why not doing it with CSS

div#menuOption:hover #menuOptionIcon{background-image:#999;url("images/icons/txtRest50.on.png")}

Open in new window

I have to use the $(this) selector bc there could be many iterations of the div 'menuOption'.
you should avoid to pass an id to more than one DOM Element in your HTML, pass a class instead.

The proper way to use the children method is like this:

But like this you are calling the children of the menuOptionIcon Element. What you want to do is to call the children of the menuOption Element, so try like this:
$("#menuOptionIcon", this).css('background-image','url("images/icons/txtRest50.on.png")');

Hope this could help.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ImaginxAuthor Commented:
Perfect solution Mcnute ... Thanks .. I'm still new to jQuery - but I understand your solution.
Thank you for the great explanation.

Merry Christmas btw !!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.