如何使这个JQuery 1.3.2代码与JQuery 1.6.2兼容?


// 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(){
                $("#titlebar").fadeIn(1000);
            });
        }
    });
});

与1.3.2的区别如下:http://jquery14.com/day-01/jquery-14

1.5的发布说明:http://blog.jquery.com/2011/01/31/jquery-15-released/

1.4链接有一个破坏性更改的列表,包括到此的链接

现在是1.6http://blog.jquery.com/2011/05/03/jquery-16-released/

从jQuery 1.3.2升级到jQuery 1.5(或1.4)

最新更新