View Full Version : Need mouseout delay for Anylink CSS Menu

12-16-2009, 12:37 AM
1) Script Title: Anylink css menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

3) Describe problem: Am testing anylinkcss menu and really like it! The slight delay before the menu (multiple columns!) is displayed is awesome in FF and IE. But I need the same kind of delay when the cursor is moved OFF of the menu. Called mouseout in the code I believe. The software description says this is an option. Have searched high and low. Where do I put this in the javascript code? Many, many thanks.:)

PS: the line of code below is in the script and appears to be what I'm looking for, but there is no delay when the mouse is released. I'm just learning javascript:
effects: {delayhide: 200, shadow:{enabled:true, opacity:0.3, depth: [5, 5]}, fade:{enabled:true, duration:500}}, //customize menu effects

12-16-2009, 01:18 AM
It is tucked away a bit. In the anylinkcssmenu.js file (from the top):

//** AnyLink CSS Menu v2.0- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm
//** January 19', 2009: Script Creation date

//**May 23rd, 09': v2.1
//1) Automatically adds a "selectedanchor" CSS class to the currrently selected anchor link
//2) For image anchor links, the custom HTML attributes "data-image" and "data-overimage" can be inserted to set the anchor's default and over images.

//**June 1st, 09': v2.2
//1) Script now runs automatically after DOM has loaded. anylinkcssmenu.init) can now be called in the HEAD section

if (typeof dd_domreadycheck=="undefined") //global variable to detect if DOM is ready
var dd_domreadycheck=false

var anylinkcssmenu={

menusmap: {},
preloadimages: [],
effects: {delayhide: 200, shadow:{enabled:true, opacity:0.3, depth: [5, 5]}, fade:{enabled:true, duration:500}}, //customize menu effects

dimensions: {},

getoffset:function(what, offsettype){
return (what.offsetParent)? what[offset . . .

See the red 200? That's the number of milliseconds delay (1000 milliseconds = 1 second). Open the file using a plain text editor like NotePad, and change that value to whatever you like.

See also:

Global menu settings

at the bottom of the demo page for this script.

12-16-2009, 05:47 PM
Thanks a heap, John, for taking the time to respond. I had actually increased that number once but must have forgotten to reload the browser window or some dumb thing. I tried it and it delays just right.

Is it possible to have the menu fade out similarly to how the menu sort of fades in? That would be like beyond cool. Thanks again.