Toon posts:

javascript menu mouseovers

Pagina: 1
Acties:
  • 32 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb momenteel het volgende javascript menu:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function openMenu(cat) {
this.cat = cat;
document.write('<span class = "level1">');
document.write('<a href = "' + thisPage + '?page=null" 

target="_self">');
if (lev1img=='yes') {
document.write('<img src="' + imgPath + lev1OpName 
+'" width="' + lev1OpWidth + '" height="' 
+ lev1OpHeight + '"border="0">');
}
document.write(cat + '</a><span><br>');
for (x=0;x<thisMenu.length;x++){
 document.write('<span class = "level2">');
 if (lev2img=='yes') {
 document.write('<img src="' + imgPath 
+ lev2Name +'" width="' + lev2Width 
+ '" height="' + lev2Height + '">');
 }
 if (lev2Char=='yes') {
 document.write(bullet);
 }
 document.write('<a href="' + linka + thisMenu[x].linkb + '">' 
+ thisMenu[x].name + '</a><span><br>');
}
}

function closeMenu(cat,pass) {
this.cat = cat;
this.pass = pass;
document.write('<span class = "level1">');
document.write('<a href = "' + thisPage 
+ '?page='+pass+'" target="_self">');
if (lev1img=='yes') {
document.write('<img src="' + imgPath 
+ lev1ClosName +'" width="' + lev1ClosWidth 
+ '" height="' + lev1ClosHeight + '"border="0">');
}
document.write(cat + '</a><span><br>');
}

lev1OpName staat (in het .js bestandje) voor een pijltje verticaal (betekent: menu open)

lev1ClosName staat (in het .js bestandje) voor een
horizontaal pijltje (betekent: menu gesloten)

Nu wil ik dat als de gebruiker met de muis over de pijltjes heen gaat, de pijtjes van kleur veranderen. Hiervoor heb ik twee extra pijltjes gemaakt. Dezelfde pijlen als de open en close pijlen, alleen in een andere kleur. Nu loop ik vast, hoe bouw ik dit in in de code?

Moet het met zoiets:
code:
1
onmouseover="open_hover.gif'" onmouseout="open.gif'"

En zo ja, hoe? Voor alle zekerheid hier ook nog het stukje code in het .js bestandje dat de pijltjes definieert:
code:
1
2
3
4
5
6
7
lev1OpName='open.gif';          
lev1OpHeight='10';              
lev1OpWidth='10';
                
lev1ClosName='closed.gif';      
lev1ClosHeight='10';            
lev1ClosWidth='10';

Wie kan mij helpen?

Verwijderd

[topic=397053/1/500]

Wie kan je helpen-> /13 >:)

Verwijderd

Topicstarter
sorry, je hebt gelijk :D

Moet ik dit opnieuw posten in W&G of wordt dit doorgeschoven?

Verwijderd

Topicstarter
verzoek deze te verwijderen. Ik heb hem reeds overgezet naar W&G

  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

[topic=397053/1/100]

Doet iets met Cloud (MS/IBM)


Dit topic is gesloten.