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

时间:2011-08-01 23:22:45

标签: jquery

// 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 个答案:

答案 0 :(得分:0)

  

此处列出了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.6以及:   http://blog.jquery.com/2011/05/03/jquery-16-released/

Upgrading from jQuery 1.3.2 to jQuery 1.5 (or 1.4)

相关问题