jQuery: The Write Less, Do More JavaScript Library

 « Return to Thread: Superfish Plugin - transparency

Re: Superfish Plugin - transparency

by Joel Birch :: Rate this Message:

Reply to Author | View in Thread


Hi Adrian,

Hmm, this isn't pretty, but sort of does the job (see below). I set
the animation to fade to opacity .92 which is only a subtle amount of
transparency because deeper nested submenus will inherit this and
apply their own further .92 amount, which could get hard to read. The
onBeforeShow callback was needed to set initial values so that the
fade-in worked. Like I said - it ain't perdy:

$(document).ready(function(){
        $("ul.nav")
        .superfish({
                animation : { opacity:.92},
                onBeforeShow : function() {
                        $(this).css({
                                opacity :'.01',
                                display : 'block'
                        });
                }
        });
});

 « Return to Thread: Superfish Plugin - transparency