PDA

View Full Version : Expand/Collapse image swap IE issue



DaMasta
Mar 31st, 2007, 05:09 AM
Working on building a small business site for myself. If you browse to here (http://www.paynetech.com/paynetech/services.html), you'll see an expand/collapse section. In everything that I checked (opera, ff, ie7) the image swaps when expanding and vice versa when collapsing. However, in ie6, something funky happens. See the attached screenshot to see what I'm speaking of. Thanks for the help.

function expandCollapse(oImg){
if (oImg.src.indexOf("collapse") != -1) { //expand
oImg.src = "images/expand.gif";
oImg.title = "Expand";
}
else { //collapse
oImg.src = "images/collapse.gif";
oImg.title = "Collapse";
}
}



<div id="n" style="padding-left:10px;">
<a href="javascript:;" onmousedown="toggleDiv('network');" class="serv" onclick="expandCollapse(img0);"><img id="img0" border="0" src="images/expand.gif" alt="Expand" title="Expand"/>&nbsp;Networking & Internet</a>
<div id="network" style="display:none">
Wired or Wireless Setup<br/>
Networking Help or Repair<br/>
Wireless Security<br/>
Device Addition<br/>
</div>
</div>