ch1zra Posted August 16, 2008 Report Share Posted August 16, 2008 'ello evo mene, mucim se kao kaludjer s' kurcem (© moj matori). dakle, da prvo bacim kod, pa da izlozim problem :) html : <div style="position: fixed; right: 10px; bottom: 5px; background: transparent; color: #cccccc; font-size: 9px; font-family: FixedSys; font-weight: normal;"> <a href="#">\m/</a> <div id="downmenu"> <a href="index.php">News <=</a><br> <a href="index.php?display=Quotes">Quotes <=</a><br> <a href="index.php?display=About">About <=</a><br> <a href="index.php?display=OpRules">OP Rules <=</a><br> <a href="index.php?display=UserRules">User Rules <=</a><br> <a href="index.php?display=Connect">Connect <=</a><br> <a href="index.php?display=Contact">Contact <=</a><hr> </div> </div> deo css-a vezan za izvesni downmenu : #downmenu { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; position: fixed; bottom: 0px; right: 5px; top: auto; width: auto; color: #666666; text-align: right; padding: 10px; z-index: 100; visibility: hidden; } JS kod koji sam nasao : <script language="JavaScript"><!-- function show(object) { if (document.getElementById) { document.getElementById(object).style.visibility = 'visible'; } else if (document.layers && document.layers[object]) { document.layers[object].visibility = 'visible'; } else if (document.all) { document.all[object].style.visibility = 'visible'; } } function hide(object) { if (document.getElementById) { document.getElementById(object).style.visibility = 'hidden'; } else if (document.layers && document.layers[object]) { document.layers[object].visibility = 'hidden'; } else if (document.all) { document.all[object].style.visibility = 'hidden'; } } //--></script> elem, problem je sledeci : zelim da kad se odradi mouseover prvi DIV (prazan link) drugi DIV, zvani #downmenu postane vidljiv. Posle toga, zelim da na mouseover drugog DIV-a on postane hidden opet (kao sto bude i kad se strana ucita). ali, jebe me event bubbling, pa meni pada na pamet da eventualno dam prvom DIVu odredjeni ID isto, pa da mouseover>show radi samo ako ga trigeruje taj odredjeni ID, i isto tako za mouseout>hide da ga trigeruje samo ID downmenu. pa posto sam ja imba nubisha za JS, interesuje me moze li neko ko ima znanja i volje da mi pomogne ? Quote Ko je nub ne budi mu drug. I mean you harm. Link to comment Share on other sites More sharing options...
headcutter[LR] Posted August 16, 2008 Report Share Posted August 16, 2008 Pa koliko ja vidim ti nisi "zakacio" JS za div gore, znaci JS treba da kaze onMouseover bla bla = show, onMouseOut bla bla hide, koliko se secam ovako... Sto nisi uzeo jedan od gotovih skriptova i izmenio lepo tekst koji ti treba..? Quote Za hiljadu evra cu sam da naucim da dizajniram ;) Link to comment Share on other sites More sharing options...
ch1zra Posted August 16, 2008 Author Report Share Posted August 16, 2008 (edited) zato sto nije dovoljno interesantno uzimati gotove stvari, kad radis sam naucis ponesto :) <div style="position: fixed; right: 10px; bottom: 5px; background: transparent; color: #cccccc; font-size: 9px; font-family: FixedSys; font-weight: normal;"> <a href="#" onmouseover="show('downmenu')">\m/</a> <div id="downmenu" onmouseout="hide('downmenu')"> <a href="index.php">News <=</a><br> <a href="index.php?display=Quotes">Quotes <=</a><br> <a href="index.php?display=About">About <=</a><br> <a href="index.php?display=OpRules">OP Rules <=</a><br> <a href="index.php?display=UserRules">User Rules <=</a><br> <a href="index.php?display=Connect">Connect <=</a><br> <a href="index.php?display=Contact">Contact <=</a><hr> </div> </div> al to nece da radi, downmenu nestaje cim mi mis napusti \m/ link :| //edit typo Edited August 16, 2008 by ch1zra Quote Ko je nub ne budi mu drug. I mean you harm. Link to comment Share on other sites More sharing options...
johnnz Posted August 16, 2008 Report Share Posted August 16, 2008 Pozdrav ch1zr0 hakeru, kažeš neće da ostane div id="downmenu" kad miš ode sa linka \m/... Brzo i prljavo rešenje koje mi pada na pamet je ............ ............ <a href="#" onmouseover="show('downmenu')" onmouseout="show('downmenu')">\m/</a> <div id="downmenu" onmouseout="hide('downmenu')"> ............ ............ ............ U principu bi ovo trebalo odraditi samo sa css-om i html-om + javascript za IE (jerbo ne podržava hover css). Na http://www.dynamicdrive.com/ ćeš sigurno pronaći rešenje. Pozdrav Johnnz. Quote Link to comment Share on other sites More sharing options...
ch1zra Posted August 16, 2008 Author Report Share Posted August 16, 2008 nope. i dalje reaguje cim hoverujem/onmouseoverujem bilo koji link u downmenu divu i sklanja ga :| Quote Ko je nub ne budi mu drug. I mean you harm. Link to comment Share on other sites More sharing options...
johnnz Posted August 16, 2008 Report Share Posted August 16, 2008 Ček, polako 1. Kada miš napusti \m/ link i ne pređe na downmenu div da li i dalje ostaje vidljiv downmenu?To je ono sto si hteo? 2. Za ovo da nestaje kada pređe na downmenu div probaj da izbaciš onmouseout. Znači <div id="downmenu"> pa kad uradiš mouseover nekog drugog diva ubaci onmouseover="hide('downmenu')" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.