View Full Version : onmouseout

02-16-2007, 02:14 PM
i have this command

<div id="offerings" onmouseover="switchMenu('ouroffer')">

this opens up a div tag and shows a message.

the i have another
<div id="about" onmouseover="switchMenu('oboutus')">

wich does the same,
and another and so on...

but I want it so that if you click one and it opens then you click the next on it closes any of the others that are open...

any one help?

02-16-2007, 02:50 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


<script language="JavaScript" type="text/javascript">

var Last='d1';

function SwapDiv(id){


<input type="button" value="D1" onclick="SwapDiv('d1');" >
<input type="button" value="D2" onclick="SwapDiv('d2');" >
<input type="button" value="D3" onclick="SwapDiv('d3');" >
<div id="d1" style="position:relative;overflow:hidden;width:200px;height:100px;background-Color:red;" ></div>
<div id="d2" style="position:relative;overflow:hidden;width:200px;height:0px;background-Color:green;" ></div>
<div id="d3" style="position:relative;overflow:hidden;width:200px;height:0px;background-Color:blue;" ></div>


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum