Jquery -如何包含文件

Jquery - how to include files?

本文关键字:文件 何包含 Jquery      更新时间:2023-09-26

这是HTML标签的一部分。

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
        <script type="text/javascript" src="custom.js"></script>

在custom.js中我有part

$(document).ready(function (){
    //$('#mask').hide();    
    //$('#game').hide();
    $('.game-button').hover(
        function() {$(this).fadeTo('fast','1');},
        function() {$(this).fadeTo('slow','0');}
    );
    $('#progressbar').progressbar({
      value: 37
     });
    $('#acces a').click(function(){
        $('#mask').fadeIn('fast');
        $('#game').fadeIn('fast');
    });
});

但是没有响应。为什么?

你需要在你的脚本源代码前面添加http://:

//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

:

http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

jquery-ui库也是如此。