473,473 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding delay to Suckerfish CSS menus

z
I'm using a horizontal CSS-based dropdown menu based on this code:
http://www.weblens.org/templates/sample_menu.html

Is there a relatively easy way to add a slight delay to the menu with
JavaScript, so that when you take the mouse off the sub-menus don't
disappear right away?
Nov 6 '06 #1
5 3947
z wrote:
I'm using a horizontal CSS-based dropdown menu based on this code:
http://www.weblens.org/templates/sample_menu.html

Is there a relatively easy way to add a slight delay to the menu with
JavaScript, so that when you take the mouse off the sub-menus don't
disappear right away?
That menu uses pure CSS for the menus for some browsers and a
combination of script and CSS for others (some will use both, results
may vary). The CSS is reliant on the hover attribute on LI elements -
it isn't supported by IE 6 but it is (supposed to be) supported by IE
7.

The script infers lack of LI hover support using:

if (document.all && document.getElementById) { ... }

which is clearly flawed logic - e.g. Opera supports li:hover and will
return true to the above test. Also, not all browsers that fail the
above test support li:hover, they will not see "drop down" menus (which
might be preferred).

As far as I know, you can't delay CSS effects like hover, but you'll
get a better answer in a CSS group:

news:comp.infosystems.www.authoring.stylesheets
<URL:
http://groups.google.com.au/group/co...esheets?lnk=li
>
--
Rob

Nov 7 '06 #2
RobG said the following on 11/6/2006 8:05 PM:
z wrote:
>I'm using a horizontal CSS-based dropdown menu based on this code:
http://www.weblens.org/templates/sample_menu.html

Is there a relatively easy way to add a slight delay to the menu with
JavaScript, so that when you take the mouse off the sub-menus don't
disappear right away?

That menu uses pure CSS for the menus for some browsers and a
combination of script and CSS for others (some will use both, results
may vary). The CSS is reliant on the hover attribute on LI elements -
it isn't supported by IE 6 but it is (supposed to be) supported by IE
7.
You can write it down as working in IE7 without the script in the page.
Saving it locally and removing all script blocks the menu works exactly
the same as it does in FF2.0 and Opera 9. It also made no difference
what DTD was present. Currently, the site has a loose DTD. Saving it and
changing it to a strict DTD had no impact on the menu. Maybe with IE7
going live more people will be getting away from IE6 and start using IE7
in the future.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '06 #3
Randy Webb wrote:
Maybe with IE7
going live more people will be getting away from IE6 and start using IE7
in the future.
Anyone running Windows XP or later and using Windows Update will
essentially be forced to upgrade to IE 7. When that happens, it will
rapidly overtake IE 6 as the most common IE, and likely most common
browser, in use.

Maybe we'll see an explosion of IE version detection techniques and
forking code as a result - it can have its own private browser war all
on its lonesome. :-)

A benefit may be that users of Windows 2000 or earlier will move to
Firefox or Opera or whatever and realise that other browsers offer a
genuine choice.
--
Rob

Nov 7 '06 #4
RobG said the following on 11/6/2006 11:43 PM:
Randy Webb wrote:
>Maybe with IE7
going live more people will be getting away from IE6 and start using IE7
in the future.

Anyone running Windows XP or later and using Windows Update will
essentially be forced to upgrade to IE 7.
And being forced to upgrade from IE6 to IE7 is a bad thing?
When that happens, it will rapidly overtake IE 6 as the most common IE,
and likely most common browser, in use.
At least that is MS' hopes :)
Maybe we'll see an explosion of IE version detection techniques and
forking code as a result - it can have its own private browser war all
on its lonesome. :-)
That brings up a good question. How would you use object detection to
determine whether :hover is supported on li elements? Without resorting
to browser detection.
A benefit may be that users of Windows 2000 or earlier will move to
Firefox or Opera or whatever and realise that other browsers offer a
genuine choice.
Probably not though as people using earlier Windows either don't have a
choice (corporate decisions) or simply can't upgrade it to XP.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '06 #5
In message <2f********************@telcove.net>, Tue, 7 Nov 2006
01:50:01, Randy Webb <Hi************@aol.comwrites
>RobG said the following on 11/6/2006 11:43 PM:
>Randy Webb wrote:
>>Maybe with IE7
going live more people will be getting away from IE6 and start using IE7
in the future.
Anyone running Windows XP or later and using Windows Update will
essentially be forced to upgrade to IE 7.

And being forced to upgrade from IE6 to IE7 is a bad thing?

With any forced change, there is a risk of breaking something on which
users are, rightly or wrongly, depending. For example, in Win98 I made
extensive use of an imported 32-bit utility which appears not to be
usable in WinXP (though the 16-bit version still works, many other
improvements and changes were made in the 32-bit one).

The intelligent plan would be for the upgrade to retain IE6 completely
unaltered but to install IE7 beside it (and likewise for all other
upgrades (apart from bug[*]/security fixes?)). The icons and menu
entries could call a small handler program which would enable either or
both versions to be started. OS changes might be needed to permit that.

[*] An unexpected bug fix might be worse in effect than the bug, while
in principle being correct. Consider a continuing set of disc data
"indexed" by week number from VBS DatePart("ww", <DATE>, vbMonday,
vbFirstFourDays) which seems wrong for 3 days per 28 years. Fixing
the bug would change the relationship between Gregorian Date and Week
Number in existing data sets.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Plaintext, quoting : see <URL:http://www.usenet.org.uk/ukpost.html>
Do not Mail News to me. Before a reply, quote with ">" or "" (SoRFC1036)
Nov 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martial Spirit | last post by:
Hello- I was amazed at the suckerfish drop-downs from AListApart.com. They work great except for one thing, if I position the drop-downs over an iframe element, on mouseover the menus disappear....
10
by: Richard | last post by:
The style sheet shown below is from the suckerfish vertical menu. http://www.htmldog.com/articles/suckerfish/dropdowns/example/vertical.html I've added in a few minor changes to color code the...
10
by: Eric Petruzzelli | last post by:
If I fill my dataset and there is no data. The dataset is still created with zero rows (all columns are there). When I add my first row using the script below, it takes over 2 seconds to add??? If...
23
by: timmy | last post by:
Anyone knows if the htmldog suckerfish menu can be done in a more fluid way: http://www.htmldog.com/articles/suckerfish/dropdowns/ Or more precisely, the 2-level menu:...
3
by: j0nharris | last post by:
I'm using the suckerfish vertical menu, & the positioning is working like a charm in every browser except IE6 -- go figure! The menu is sitting on its own page for now on...
1
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
i'm using suckerfish dropdowns, for my menus. it looks nice. but i have a problem: when i get a div with overflow: hidden property after it, the menu is overdrawed by this div.
0
by: Aljosa Mohorovic | last post by:
i have a problem with suckerfish dropdowns (a variation) in ie6, flickering/flashing/... bug? don't know how to call it but you can see it at http://obi-wan.inside-server.com/~crash/hr original...
1
by: pedalpete | last post by:
Hey Gang, More difficult to describe this than see it, so here's a link which shows the issue I'm having http://zifimusic.com/testing/broken-hovers.html I've been looking at this for quite a...
1
by: phpmagesh | last post by:
Can any one guide me how to create sucker fish menu step by step. i seen in Son of Suckerfish Dropdowns | HTML Dog but i cant able to do where to start and where to write which code. can any...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.