Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    i started with this menu and the level 1 primary link bg bounces in but I would like it to fade in

    original code
    Code:
    $(document).ready(function(){
        if ($.browser.msie && parseInt($.browser.version) < 7){
            $('#menu ul.menu li').hover(
                function(){ $(this).addClass('sfhover'); },
                function(){ $(this).removeClass('sfhover'); }
            );
        }
        $('#menu ul.menu > li').children('a').children('span').after("<span class=\"bg\">&nbsp;</span>");
        //---bouncing bg
        $('#menu ul.menu > li').hover(
            function(){
                //---IE7 width bugfix
                $(this).find('span.bg').css("width", $(this).width());
                //---end of IE7 width bugfix
                $(this).find('span.bg').stop(true,true).animate({
                    "marginTop" : "-30px"
                }, 500, "bounceout");
            },
            function(){
                $(this).find('span.bg').stop(true,true).animate({
                    "marginTop" : "0"
                }, 500, "bounceout");
            }
        );
    modified code, what i'm trying

    Code:
    $(document).ready(function(){
        if ($.browser.msie && parseInt($.browser.version) < 7){
            $('#menu ul.menu li').hover(
                function(){ $(this).addClass('sfhover'); },
                function(){ $(this).removeClass('sfhover'); }
            );
        }
        $('#menu ul.menu > li').children('a').children('span').after("<span class=\"bg\">&nbsp;</span>");
        //---bouncing bg
        $('#menu ul.menu > li').hover(
            function(){
                //---IE7 width bugfix
                $(this).find('span.bg').css("width", $(this).width());
                //---end of IE7 width bugfix
                $(this).find('span.bg').fadeIn(500);
            },
            function(){
                $(this).find('span.bg').fadeIn(500);
            }
        );
    also tried this
    Code:
        $(document).ready(function(){
    $("ELEMENT HERE").fadeTo("slow", 0.3);
    $("ELEMENT HERE").hover(function(){
    $(this).fadeTo("slow", 1.0);
    },function(){
    $(this).fadeTo("slow", 0.3);
    });
    });

  2.  

  3. #2
    WDF Staff MikeB's Avatar
    Join Date
    Jun 2010
    Location
    Lincolnshire, UK
    Posts
    88
    Member #
    22274
    Are you having problems with this or not?
    Sorry, just it was more of a statement post, with the blocks of code with no real message as to whether you were having problems, if so what with or whether it was example code for other people to use!

    Could you just clear up what you meant with this post?
    Mike Barlow
    WDF Co-Owner

    Need help? PM Me!

  4. #3
    Senior Member paintingtheweb's Avatar
    Join Date
    Jul 2007
    Location
    Las Vegas
    Posts
    128
    Member #
    15503
    You're trying to get from bouncing to fading right? You can probably just use the .fadeIn("fast") instead of using the animate function. The bouncing is coming from the easing option you have filled in (bounceout, etc) - if you don't want easing, no need to use that.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:31 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com