Javascript jquery指定任务不工作

Javascript jquery指定任务不工作,javascript,jquery,Javascript,Jquery,})); 以下具有fadeIn慢速属性的代码也不起作用 $(document).ready(function(){ $('#breg').click(function(){ $('#breg').effect('explode'); }); })) 我不太确定您在这里要做什么,但这里有一些东西可以使用您上面提到的UI功能: 测验 #布雷格{ 宽度:200px; 高度:200px; 背景:红色; 光标:指针; } #breg2{ 宽度:200px; 高度:200px; 背景:蓝色;

})); 以下具有fadeIn慢速属性的代码也不起作用

$(document).ready(function(){
$('#breg').click(function(){
    $('#breg').effect('explode');
});

}))

我不太确定您在这里要做什么,但这里有一些东西可以使用您上面提到的UI功能:


测验
#布雷格{
宽度:200px;
高度:200px;
背景:红色;
光标:指针;
}
#breg2{
宽度:200px;
高度:200px;
背景:蓝色;
光标:指针;
}
$(文档).ready(函数(){
$('#breg')。单击(函数(){
$(this.effect('explode');
});
$('#breg2')。单击(函数(){
$(这个)。淡出(“慢”);
});
$(“按钮”)。单击(函数(){
$('breg').fadeIn('slow');
$('breg2').fadeIn('slow');
});
});
重置

您已经加载了两次jQuery!index.htmlWhere是#breg,请发布相关的HTML。
$(document).ready(function(){
$('#breg').click(function(){
    $('#breg').effect('explode');
});
    $(document).ready(function(){
$('#breg').click(function(){
    $('#breg').fadeOut('slow');
});
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Test</title>
    <style>
        #breg {
            width: 200px;
            height: 200px;
            background: red;
            cursor: pointer;
        }
        #breg2 {
            width: 200px;
            height: 200px;
            background: blue;
            cursor: pointer;
        }
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
    <script>
        $(document).ready(function(){
            $('#breg').click(function(){
                $(this).effect('explode');
            });
            $('#breg2').click(function(){
                $(this).fadeOut('slow');
            });
            $('button').click(function () {
                $('#breg').fadeIn('slow');
                $('#breg2').fadeIn('slow');
            });
        });
    </script>
</head>
<body>

<div id="breg"></div>
<div id="breg2"></div>
<button>Reset</button>

</body>
</html>