Get a free trial // Grow your CSS skills // Land your dream job

help with background overlay

  • # February 22, 2013 at 2:47 pm

    Im Working on this Page: []( “”) When hovering on Referrals Button, a Background Overlay appears, I need it to gradually appear.

    Maybe some Fade in or out animation.

    I’m using this script to make the Overlay run.

    $('#coins').on('mouseenter', function(){
    var w = $(window).width();
    var h = $(window).height();
    $('').appendTo('body').addClass('overlay').css({ 'width': w, 'height': h });
    }).on('mouseleave', function(){
    # February 22, 2013 at 4:46 pm

    Link is dead (it worked earlier though), anyway you can use jQuery’s fadeIn and fadeOut functions, you can probably add them somewhere in your chain of functions.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed