The scenario is described below.
<li onmouseover="swapArrow_white()" onmouseout="swapArrow_black()"><a href="#">Menu<img src="common/images/downArrow.png" class="downarrow" /></a>
<li onmouseover="swapArrow_white()" onmouseout="swapArrow_black()"><a href="#">Menu<img src="common/images/downArrow.png" class="downarrow" /></a>
<li onmouseover="swapArrow_white()" onmouseout="swapArrow_black()"><a href="#">Menu<img src="common/images/downArrow.png" class="downarrow" /></a>
I need to change the Down arrow image on the mouseover event of the li. I am using the following script.
function swapArrow_white(){
$("img.downarrow").attr("src","common/images/downArrowWhite.png");
}
function swapArrow_black(){
$("img.downarrow").attr("src","common/images/downArrow.png");
}
but, when ever mouseover event occurs, all the dropdown image get changed. It is not picking the current LI on which mouseover event occured.
is there any method to get the current LI so that only one image can change at one time
Please help me with this problem?