Grow your CSS skills. Land your dream job.

Firefox is suddenly laggy? O.o

  • # January 27, 2013 at 6:03 pm

    Im currently developing a suite for a mediacompany that has workers that maybe arnt able to use a mouse. Ive created a script so when these people press either shift or alt a menu will appear, and with next key they press it will take them to the right place on the webpage.

    Ive inserted a script from outside called “[foggy](http://nbartlomiej.github.com/foggy/ “foggy”)”.

    **Problem!**
    It works great in WebKit browsers but not in Firefox for some reason.
    When I take away the script “foggy” the menu comes up faster and the first page I chose to go to is functioning sometimes. But then everything is down. The shortkey dosnt work and same with the menu… THIS WORKS IN Webkit browsers…

    Here is the listening code:

    $(document).keydown(function(e) {
    if(e.shiftKey || e.altKey) {
    $('#menu').show();
    $('.wrapper, #page').foggy();
    console.log(e.which);
    if(e.which == 72 && e.shiftKey || e.which == 72 && e.altKey) {
    $('.ascensorLink1').click();
    } else if(e.which == 78 && e.altKey) {
    $('.ascensorLink2').click();
    } else if(e.which == 75 && e.altKey) {
    $('.ascensorLink3').click();
    } else if(e.which == 79 && e.altKey) {
    $('.ascensorLink4').click();
    } else if(e.which == 82 && e.altKey) {
    $('.ascensorLink5').click();
    } else if(e.which == 80 && e.altKey) {
    $('.ascensorLink6').click();
    }
    }
    }).keyup(function(e) {
    $('#menu').hide();
    $('.wrapper, #page').foggy(false);
    });
    # January 27, 2013 at 7:23 pm

    It looks like foggy uses `-webkit-filter: blur(2px);` to blur the block in Webkit; but since Firefox doesn’t support it the blur filter, foggy makes about 16 copies of the block of HTML and positions it is a sort of circle to give it that blur effect… that’s why Firefox is laggy. I bet it would be even more laggy if there was a video in that block as well.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".