Skip to main content

Bug Tracker

Side navigation

Ticket #3583: recursion-animation.html

File recursion-animation.html, 1.1 KB (added by adrien.gibrat, November 08, 2008 01:55PM UTC)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" dir="ltr" lang="fr-FR">
<head profile="">
	<title>Test case: too much recursion with animation</title>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
        $.fn.fixedScroll = function(speed, easing, callback){
            var self    = this.css('position', 'relative'),
                animate = $.extend({queue: false}, $.speed(speed, easing, callback));
                self.animate({top: $(this).scrollTop()}, animate);// this will bug "too much recursion" 
                //self.animate({top: $(this).scrollTop()}, $.extend({}, animate));// this works... 
    <div style="height:2000px"><p id="fixed">this text should scroll with the page</p></div>

Download in other formats:

Original Format