forgetmenow
07-02-2008, 09:03 AM
I have put this up on the site to show you all http://www.waggysfancydress.co.uk/new_page_4.htm
but the cose seems to be a bit out some how and cant figger it out on how to get the mose over to show one full picture instead of all little ones, any ideas? here is the code.
<p align="center"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fan JS</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript">
var theElements = new Array('element1', 'element2', 'element3', 'element4', 'element5');
var defaultElements = new Array('main_1.png', 'main_2.png', 'main_3.png', 'main_4.png', 'main_5.png');
var Elements_1 = new Array('main_1.png', 'main_1.png', 'main_1.png', 'main_1.png', 'main_1.png');
var Elements_2 = new Array('main_2.png', 'main_2.png', 'main_2.png', 'main_2.png', 'main_2.png');
var Elements_3 = new Array('main_3.png', 'main_3.png', 'main_3.png', 'main_3.png', 'main_3.png');
var Elements_4 = new Array('main_4.png', 'main_4.png', 'main_4.png', 'main_4.png', 'main_4.png');
var Elements_5 = new Array('main_5.png', 'main_5.png', 'main_5.png', 'main_5.png', 'main_5.png');
function highlightfan(qelements, images){
for(i = 0; i <= qelements.length - 1; i++)
document.getElementById(qelements[i]).src = (images instanceof Array) ? images[i]:images;
}
</script>
<style type="text/css">
a img{
border: none;
}
</style>
</head>
<body>
<div id="fan">
<a href="#" onmouseover="highlightfan(theElements, Elements_1)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_1.png" id="element1" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_2)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_2.png" id="element2" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_3)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_3.png" id="element3" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_4)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_4.png" id="element4" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_5)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_5.png" id="element5" width="80" height="300" alt="" /></a>
</div>
</body>
</html></td>
</tr>
</table>
any help on this one would be great, thanks all
but the cose seems to be a bit out some how and cant figger it out on how to get the mose over to show one full picture instead of all little ones, any ideas? here is the code.
<p align="center"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fan JS</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript">
var theElements = new Array('element1', 'element2', 'element3', 'element4', 'element5');
var defaultElements = new Array('main_1.png', 'main_2.png', 'main_3.png', 'main_4.png', 'main_5.png');
var Elements_1 = new Array('main_1.png', 'main_1.png', 'main_1.png', 'main_1.png', 'main_1.png');
var Elements_2 = new Array('main_2.png', 'main_2.png', 'main_2.png', 'main_2.png', 'main_2.png');
var Elements_3 = new Array('main_3.png', 'main_3.png', 'main_3.png', 'main_3.png', 'main_3.png');
var Elements_4 = new Array('main_4.png', 'main_4.png', 'main_4.png', 'main_4.png', 'main_4.png');
var Elements_5 = new Array('main_5.png', 'main_5.png', 'main_5.png', 'main_5.png', 'main_5.png');
function highlightfan(qelements, images){
for(i = 0; i <= qelements.length - 1; i++)
document.getElementById(qelements[i]).src = (images instanceof Array) ? images[i]:images;
}
</script>
<style type="text/css">
a img{
border: none;
}
</style>
</head>
<body>
<div id="fan">
<a href="#" onmouseover="highlightfan(theElements, Elements_1)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_1.png" id="element1" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_2)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_2.png" id="element2" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_3)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_3.png" id="element3" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_4)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_4.png" id="element4" width="80" height="300" alt="" /></a>
<a href="#" onmouseover="highlightfan(theElements, Elements_5)" onmouseout="highlightfan(theElements, defaultElements)"><img src="Javascript/main_5.png" id="element5" width="80" height="300" alt="" /></a>
</div>
</body>
</html></td>
</tr>
</table>
any help on this one would be great, thanks all