开发者

How can I make this JQuery 1.3.2 code compatible with jQuery 1.6.2?

开发者 https://www.devze.com 2023-03-24 17:23 出处:网络
// JavaScript Document $(document).ready(function(){ $buildingup = false; $(\"#sliders>*\").show(); //Blurs all links when clicked
// JavaScript Document
$(document).ready(function(){
    $buildingup = false;

    $("#sliders>*").show();

    //Blurs all links when clicked
    $("a").click(function(){
        $(this).blur();
    });

    $(this).delay(2000,function(){
        $("#titlebar").fadeOut(1000);
    });

    $(this).delay(3500,function(){
        //Show the elements
        $(".village").stop().animate({top:'30px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
        $(".cloudbar").stop().animate({top:'0px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
        $buildingup = true;
    });

    $("a.toggle").click(function(){
        if ($buildingup == false){

            $("#titlebar").fadeOut(1000);
            $(this).delay(1000,function(){
                $(".village").stop().animate({top:'30px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
                $(".cloudbar").stop().animate({top:'0px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
                $buildingup = true;
            });
        }else{
            $(".village").stop().animate({top:'366px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
            $(".cloudbar").stop().animate({top:'-465px'}, {queue:false, duration:2000, easing: 'easeInOutBack'});
            $buildingup = false;

            $(this).delay(2000,function(){
                $("#titleb开发者_StackOverflowar").fadeIn(1000);
            });
        }
    });
});


The differences between 1.3.2 are listed here: http://jquery14.com/day-01/jquery-14

And the release notes for 1.5: http://blog.jquery.com/2011/01/31/jquery-15-released/

The 1.4 link has a list of breaking changes, including a link to this plugin to counteract the breaking changes.

And now 1.6 as well: http://blog.jquery.com/2011/05/03/jquery-16-released/

Upgrading from jQuery 1.3.2 to jQuery 1.5 (or 1.4)

0

精彩评论

暂无评论...
验证码 换一张
取 消