ypSlideOutMenus issue

A

Anne V. Masters

I have implemented ypSlideOutMenus
(http://ypslideoutmenus.sourcef­orge.net/archived-comments.htm­l) on this
yet-to-open-officially site: Women of Substance
(http://www.womenofsubstance.us­/catalog). The drop-down menu is working
fine (only optimized for IE currently) but I need some help as I am
javascript challenged and nothing I've tried has worked.

Currently, the menu is enabled by a mouseover which my client really likes
but which makes the menus drop down whenever the cursor happens to move over
them. My client finally sees this as a potential problem. I'd like to change
to an onclick event but when I've tried that, the menus become very jerky
and weird. I'm hoping someone here can point me in a productive direction
since the script is no longer being supported (I have scoured its forum).

I can't include the code here as it would make the message too long. I'll
email it to anyone who wants to look at it.

Thanks and huge appreciation to all who look at this issue for me.

Anne
 
S

Stephen Chalmers

Anne V. Masters said:
I have implemented ypSlideOutMenus
(http://ypslideoutmenus.sourcef­orge.net/archived-comments.htm­l) on this
yet-to-open-officially site: Women of Substance
(http://www.womenofsubstance.us­/catalog). The drop-down menu is working
fine (only optimized for IE currently) but I need some help as I am
javascript challenged and nothing I've tried has worked.

Currently, the menu is enabled by a mouseover which my client really likes
but which makes the menus drop down whenever the cursor happens to move over
them. My client finally sees this as a potential problem. I'd like to change
to an onclick event but when I've tried that, the menus become very jerky
and weird. I'm hoping someone here can point me in a productive direction
since the script is no longer being supported (I have scoured its forum).

I can't include the code here as it would make the message too long. I'll
email it to anyone who wants to look at it.

Thanks and huge appreciation to all who look at this issue for me.

Anne
I think the simplest fix is to implement a delay to the function call after the mouseover, which can be cancelled by a
mouseout event. This would require the cursor to remain over a link for half a second before the associated menu
appeared.

To save retyping all the existing calls, add the code below either into the head section of the page containing the
menus, or add it to the .js file (without the <script> tags).
Then in your html, perform a global search and replace on the exact text as shown below.

Replace
ypSlideOutMenu.showMenu
with
delayMenu

Replace
ypSlideOutMenu.hideMenu
with
cancelDelay

<script type='text/javascript'>
ypMenuTimer=null;

function delayMenu( id )
{
ypMenuTimer=setTimeout("ypSlideOutMenu.showMenu('"+id+"')", 500 );
}
function cancelDelay( id )
{
clearTimeout( ypMenuTimer );
ypSlideOutMenu.hideMenu( id );
}
</script>
 
A

anne_masters

Thanks Stephen,

It worked. I may fiddle with the timing depending on response.

Much, much appreciation,

Anne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top