j查询指定任务不起作用

jquery specify task are not working

本文关键字:任务 不起作用 查询      更新时间:2023-09-26
<head>
<link type="text/css" rel="stylesheet" href="index.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
 <script src="//code.jquery.com/jquery-1.10.2.js"></script>
 <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script src="index.js">
</script>

这被命名为索引.html带有jquery UI和我的js脚本

以下是效果爆炸不起作用的索引.js代码

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

});以下带有 fadeIn slow 属性的代码也不起作用

    $(document).ready(function(){
$('#breg').click(function(){
    $('#breg').fadeOut('slow');
});

});

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

演示

<!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>