Update: My Firefox memory must have been overloaded - I restarted Firefox
and the times are down to 100ms, as expected. Could jquery be adding things
to the DOM slowing down parsing?
Eric

On Wed, Jan 13, 2010 at 12:29 AM, Eric Cope <eric.c...@gmail.com> wrote:

> Hello all,
> I am using the slideUp animation to hide a div.  Above the div, are 25
> other divs that may or may not be visible. The speed of the slideUp
> animation depends on how many of those divs are visible. if 25 divs
> are visible, the animation takes 1200ms. If 20 divs are visible, the
> animation takes 700ms. If 15 divs are visible, it takes 600ms. If 10
> divs are visible, it takes 470-500 ms. if 5 divs are visible it takes
> ~350ms (as an fyi the slideDown takes 350ms regardless of divs
> visible).
>
> About half the time is spend in css() and half in hidden(). I don't
> see why it should take upto 600ms to compare two values in hidden().
> If I take out slideUp and place in hide() it takes longer!
> If I take out slideUp and place in
>    document.getElementById("endorsementFeeAdjust").style.display =
> 'none';
> The css() time goes to 0, but hidden is still taking the same amount
> of time.
>
> If I take out the fadeOut and fadeIn, then the hidden drops to 0 as
> well. Why does hidden take so long?
>
> $("#addEndorseFeeBtn").click(function() {
>                if($("#endorsementFeeAdjust").is(":hidden")){
>                        $("#endorsementFeeAdjust").slideDown("slow",function
> () {
>
>  $("#addEndorseFeeBtn").fadeOut("fast").text("Remove Endorsement
> Fee Adjustment").fadeIn("fast");
>                        });
>                }
>                else {
>                        $("#endorsementFeeAdjust").slideUp('slow', function
> () {
>
>  $("#addEndorseFeeBtn").fadeOut('slow').text("Add Endorsement Fee
> Adjustment").fadeIn("fast");
>
>  //$("#endorsementFeeAdjustmentDescription").val("");
>
>  //$("#endorsementFeeAdjustmentAmount").val("");
>                        document.getElementById
> ("endorsementFeeAdjustmentDescription").value = '';
>
>  document.getElementById("endorsementFeeAdjustmentAmount").value
> = '';
>                        });
>                }
>        });
>
> Thank you,
> Eric




-- 
Eric Cope
http://cope-et-al.com

Reply via email to