Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16450
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Date | Sun, 07 Oct 2012 19:00:39 +0200 |
| From | Luuk <luuk@invalid.lan> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Persistent onmouseout/hover |
| References | <fno278h63p6td5tdotujtdujpehmri0g11@4ax.com> <lbd8k9-ci3.ln1@luuk.invalid.lan> <eea378lntfb01lmc86blgc7r3c47mg46re@4ax.com> |
| In-Reply-To | <eea378lntfb01lmc86blgc7r3c47mg46re@4ax.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <n2p8k9-fh6.ln1@luuk.invalid.lan> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 2001:980:9089:1:59d6:cfdf:c33b:818e |
| X-Trace | 1349629801 news.xs4all.nl 6947 [2001:980:9089:1:59d6:cfdf:c33b:818e]:48653 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.javascript:16450 |
Show key headers only | View raw
On 07-10-2012 18:15, joe wrote:
> Here's my test sample. The html below display's some text in a red box. When
> mouse move over the box a blue line is displayed around the red box.
> When mouse exit's the box the blue line disappears.
>
> If I try to set a time for removal of the blue line I get nothing: the blue line
> stays there.
>
>
> <html><head>
> <script type="text/javascript">
> function timeout_trigger(test) {
> test.style.border = "";
> }
>
> function OnMouseIn (elem) {
> elem.style.border = "2px solid blue";
> }
>
> function OnMouseOut (elem) {
> //setTimeout('timeout_trigger(elem)', 500); //this does not work
> timeout_trigger(elem); //this works
> }
function OnMouseOut (elem) {
//setTimeout('timeout_trigger(elem)', 500); //this does not work
//timeout_trigger(elem); //this works
setTimeout(function() { timeout_trigger(elem) }, 500);
}
There should not be any single quoot in de first parameter of setTimeout
(or setInterval() )......
> </script></head>
> <body>
> <div style="background-color:red; width:200px" onmouseover="OnMouseIn(this)"
> onmouseout="OnMouseOut(this)">
> Move your mouse pointer into and out of this element!
> </div></body></html>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Persistent onmouseout/hover joe <mt@invalid.com> - 2012-10-07 14:25 +0300
Re: Persistent onmouseout/hover Luuk <luuk@invalid.lan> - 2012-10-07 15:40 +0200
Re: Persistent onmouseout/hover joe <mt@invalid.com> - 2012-10-07 19:15 +0300
Re: Persistent onmouseout/hover Luuk <luuk@invalid.lan> - 2012-10-07 19:00 +0200
Re: Persistent onmouseout/hover Danny <dann90038@gmail.com> - 2012-10-07 12:00 -0700
csiph-web