🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49674

Re: zmiana display po onmousover/onmouseout

#49674
From: Paweł Arciszewski
Date: Tue, 12 Jan 2010 15:33
66 lines
2432 bytes
W dniu 2010-01-12 14:01, |<ońrad pisze:
> <a
>    href=""
>    class="wiecej"
>    onmouseover="document.getElementById
> ('menuWDol1').style.display='block';return false"
>    onclick="document.getElementById
> ('menuWDol1').style.display='none';return false">
> Więcej</a>
>
> Kod owego id="menuWDol1":
>
> <div class="menuWDol" id="menuWDol1">
>   <h2>
>    <a href="#narzedziownia" class="tab">Narzędziownia</a>
>   </h2>
> {...}
> </div>
>

<script>
var OVER_MENU = false;
function menuWDol1Show(menu){
	if (!menu){
		menu = document.getElementById('menuWDol1');
	}
	if (menu.style.display == 'none'){
		menu.style.display = 'block';
	}
	return false;
}
function menuWDol1Hide(menu){
	if (!menu){
		menu = document.getElementById('menuWDol1');
	}
	var menu = document.getElementById('menuWDol1');
	if (menu.style.display != 'none'){
		menu.style.display = 'none';
	}
	return false;
}
</script>

...

<a
   href=""
   class="wiecej"
   onmouseover="OVER_MENU = true; return menuWDol1Show()"
   onmouseout="if (!OVER_MENU) {return menuWDol1Hide()}">
Więcej</a>

Kod owego id="menuWDol1":

<div class="menuWDol" id="menuWDol1" onmouseover="OVER_MENU = true; 
return menuWDol1Show(this)" onmouseout="OVER_MENU = false; return 
menuWDol1Hide(this)">
  <h2>
   <a href="#narzedziownia" class="tab">Narzędziownia</a>
  </h2>
{...}
</div>


Pozdrawiam,
Paweł Arciszewski
Technical Details
Message-ID: <hii4oa$dbj$1@news.task.gda.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.task.gda.pl!not-for-mail
References: <hihrqg$4kp$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.task.gda.pl!not-for-mail
From: Paweł Arciszewski <p.arciszewski@archol.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: zmiana display po onmousover/onmouseout
Date: Tue, 12 Jan 2010 16:33:30 +0100
Organization: CI TASK http://www.task.gda.pl/
Lines: 68
Message-ID: <hii4oa$dbj$1@news.task.gda.pl>
References: <hihrqg$4kp$1@inews.gazeta.pl>
NNTP-Posting-Host: 87-205-221-47.adsl.inetia.pl
Mime-Version: 1.0
X-Trace: news.task.gda.pl 1263310410 13683 87.205.221.47 (12 Jan 2010 15:33:30 GMT)
X-Complaints-To: abuse@news.task.gda.pl
NNTP-Posting-Date: Tue, 12 Jan 2010 15:33:30 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
In-Reply-To: <hihrqg$4kp$1@inews.gazeta.pl>
X-Antivirus: avast! (VPS 100111-0, 2010-01-11), Outbound message
X-Antivirus-Status: Clean
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit