How can I stop the flickering in Scriptaculous?

Posted by Richard Testani on Stack Overflow See other posts from Stack Overflow or by Richard Testani
Published on 2010-04-05T14:32:37Z Indexed on 2010/04/05 14:43 UTC
Read the original article Hit count: 587

Filed under:
|
|

I'm running this script on a page which shows a box with more information when you roll over it.

site for review

The script works fine, except theres a flicker of the box before it actually scales. What is causing this? I use the same thing in the main navigation with the same flicking.

Any ideas whats causing this?

//work page springing box
$$('.box').each(function(s) {

  var more = $(s).down(2);
  $(s).observe('mouseenter', function(e) {

      $(more).show();
      new Effect.Scale(more, 100, {
          scaleX: false,
          scaleY: true,
          scaleContent: false,
          scaleFrom: 1,
          mode: 'absolute',
          duration: 0.5
      });

  });

  $(s).observe('mouseleave', function(e) {


    new Effect.Fade(more, {
        duration: 0.2
    })

  });


});

Thanks. Rich

© Stack Overflow or respective owner

Related posts about scriptaculous

Related posts about JavaScript