I have created a menu using the CSS menu action and I would like the sub menus to fade in/out. I can’t find anything about it. Can anyone help? Thanks in advance.
It’s not something that Freeway can do on it’s own. That trendy effect requires a javascript library, and these days is most frequently done using jquery. I’m sure Walt has a protaculous method up his sleeve as well.
Sure. Here you go. Apply Protaculous to the page, if it isn’t already.
Choose scriptaculous-packed from the library picker. Click the top
Function Body button and paste in the code from this Gist. This will
apply the same function to all menus on the page:
To make it specific to a single menu, click once on that menu’s
container HTML box, note the name that Freeway gave it, and change the
first line of code from
document.observe(...
to
$('yourItemId').observe(...
You can change the speed of the effect, or add a delay to the effect
if you like, by modifying the parameters hash (the part inside curly
brackets on the fourth line). If you wanted a little pause before the
effect, you would change that to:
{delay:0.1,duration:0.3}
Times are in seconds, so you use decimal numbers to indicate less than
one second.
Note that it doesn’t (and can’t) fade out, only fade in. This trick
works on the fade-in by instantly hiding the submenu with JavaScript
at the same moment it’s revealed by CSS, then fading it back in with
more JavaScript. So in this direction, we’re not concerned that CSS
has shown it, because everything else happens after that moment. But
in the opposite direction, there’s no way to make it appear again
after CSS has hidden it so we can then gently fade it back out. Once
CSS has hidden it, it’s gone.
The reason that the jQuery effect can do the effect in both directions
is that it is using JavaScript for everything – all the hiding and
showing is done in one layer, not part in JavaScript and part in CSS.
The benefit to the way that Freeway does it is that it will work in
any browser that uses CSS – which is everything that’s able to be run
on a semi-modern OS – even if JavaScript is switched off in that
browser. If you have JavaScript off, you’ll just miss out on the fade,
not the entire menu.
Walter
On Feb 28, 2011, at 11:47 AM, twb716 wrote:
Amazing, Walter! It works perfectly. Thanks so much!
I was hoping you might be able to help me with the Fade in menu.
I have applied the effect to my menu (which isn’t online yet) but when using the menu in the browser and Freeway preview the menu tends to disappear when I move the mouse down the menu. Is there anything I can do about this? I also need to stop the sub menu from moving when I hover over the main menu entry which becomes bold on mouse over.
That was created with Goldfish. Apart from the fact the fading isn’t there the menu works nicely appearing and disappearing on mouse over (On ‘Portfolio’). I could upload the site as is tomorrow morning maybe? Or could I post the file on here?
That was created with Goldfish. Apart from the fact the fading isn’t there the menu works nicely appearing and disappearing on mouse over (On ‘Portfolio’). I could upload the site as is tomorrow morning maybe? Or could I post the file on here?
Cheers
Rory
hello. i also used walt’s protaculous and it works beautifully with safari, firefox and chrome, but not with internet explorer though. and i also see that the menu fades and when i move the cursor the menu disappears (very briefly) and fades back in again.
any ideas from walt (or anyone else who may know) would be greatly appreciated.
That was created with Goldfish. Apart from the fact the fading isn’t there the menu works nicely appearing and disappearing on mouse over (On ‘Portfolio’). I could upload the site as is tomorrow morning maybe? Or could I post the file on here?
Cheers
Rory
hello. i also used walt’s protaculous and it works beautifully with safari, firefox and chrome, but not with internet explorer though. and i also see that the menu fades and when i move the cursor the menu disappears (very briefly) and fades back in again.
any ideas from walt (or anyone else who may know) would be greatly appreciated.
Can you post a link to your page that shows the problem?
Walter
On Nov 28, 2011, at 2:46 PM, Ali wrote:
hello. i also used walt’s protaculous and it works beautifully with safari, firefox and chrome, but not with internet explorer though. and i also see that the menu fades and when i move the cursor the menu disappears (very briefly) and fades back in again.
any ideas from walt (or anyone else who may know) would be greatly appreciated.
Can you post a link to your page that shows the problem?
Walter
On Nov 28, 2011, at 2:46 PM, Ali wrote:
hello. i also used walt’s protaculous and it works beautifully with safari, firefox and chrome, but not with internet explorer though. and i also see that the menu fades and when i move the cursor the menu disappears (very briefly) and fades back in again.
any ideas from walt (or anyone else who may know) would be greatly appreciated.
There appear to be some functions in the CSS Menu Action that horse around with the list structure just for IE. It is possible that one of those is making the element fail to match the conditions in my code. It’s hard to say, though. What version of IE are you having difficulty with here?
There appear to be some functions in the CSS Menu Action that horse around with the list structure just for IE. It is possible that one of those is making the element fail to match the conditions in my code. It’s hard to say, though. What version of IE are you having difficulty with here?
Walter
On Nov 28, 2011, at 2:59 PM, Ali wrote:
it’s ie 9. and you know the more i think about it, its not that big of a deal if only ie is causing the problem. seeing how nicely it works with the other browsers makes me happy enough to not mind the ie bug. but if you do find a way to work through that, i would love to know.
by the way walt, i have had many questions since picking up freeway pro and many of my questions have been answered by your posts … so i thank you for sharing your knowledge with the rest of us.
You’ve set everything up correctly in Protaculous, the only issue I see here is that there aren’t any submenus in your main menu. There’s only the top-level options. You need to set up your sub-options for each main option, by nesting a second-level list item below each one.
Walter
On Feb 21, 2013, at 10:30 PM, jgalicia wrote:
thank you.!! but it does not work, this is the site produce.mx / index