Oh. Without submenus. I see. What are you expecting the fade to act on, then? This script makes the submenus fade in. Did you want the transition between normal and mouseover in the top-level menu to animate? If so, that’s a job for CSS transitions, although they won’t work in versions of IE less than 9. (Progressive enhancement – if the browser is smart enough, you will see the transition, and if it isn’t, you will just see the “snap” color change.)
Add this to your Page / HTML Markup, in the Before section. Remove Protaculous 2 from the page, too. (This code is conditioned on there being a single menu on your page, by the way.)
<style type="text/css">
#fwNav1 {
-moz-transition: background-color 0.6s;
-webkit-transition: background-color 0.6s;
-o-transition: background-color 0.6s;
transition: background-color 0.6s;
}
</style>
I haven’t tested that, but it should cause all background-color attribute changes to animate within your menu on supported browsers (modern versions of Safari, Chrome, iOS and Android, Firefox, Opera, and IE 9 or better).
Walter
On Jul 3, 2013, at 11:11 AM, Ken wrote:
Hello Walter
Thanks, but i’m having some problems, i can’t seem to get it to work. i’ve done as you instructed on the other forum post. heres what i’ve done so far:
- Got Protaculous 2, and applied it to my page.
- Check the “Add Scriptaculous Libraries” (effects is checked by default)
- Click the DOM Loaded Observer button and pasted in the following:
document.observe(‘mouseover’,function(evt){
var elm;
if((elm = evt.findElement(‘li.fwNavItem’)) && elm.down(‘ul.sub’)){
elm.select(‘ul.sub’).invoke(‘hide’).invoke(‘appear’,{duration:0.3});
}
});
(pasted correctly with the indents in Freeway)
- I preview the site and I can’t see that the fade effect has worked on the CSS Menu. Am I doing something wrong?
My CSS Menu is a simple home, about, gallery, news and contact page with no submenus. I also did try adding “$(‘yourItemId’)” in place of the “document” part of the code, as you said in your other forum post (and I did enter “cssmenu” for “yourItemId” too)
thanks
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options