Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Chrome打包应用程序的jQuery?_Jquery_Html_Google Chrome - Fatal编程技术网

Chrome打包应用程序的jQuery?

Chrome打包应用程序的jQuery?,jquery,html,google-chrome,Jquery,Html,Google Chrome,我对编写chrome应用程序是完全陌生的。我现在要做的是一个简单的flashcard应用程序。如何让jQuery在我的打包应用程序中工作?以下是html: <!DOCTYPE html> <html> <link rel="stylesheet" href="style.css" type="text/css"> <head> <script src="jquery.min.js"></script> &

我对编写chrome应用程序是完全陌生的。我现在要做的是一个简单的flashcard应用程序。如何让jQuery在我的打包应用程序中工作?以下是html:

<!DOCTYPE html>
<html>

<link rel="stylesheet" href="style.css" type="text/css">

<head>
    <script src="jquery.min.js"></script>
    <script>
        $(document).ready(function(){
            $('#navbar').fadeOut(500);
        });
    </script>
</head>


<body>
    <div id="navbar">
        <ul>
            <li>Add</li>
            <li>Edit</li>
            <li>My Stacks</li>
        </ul>
    </div>
</body>

</html>

$(文档).ready(函数(){
$(#navbar')。淡出(500);
});
  • 编辑
  • 我的书堆

我只是想淡出导航栏来测试jQuery是否有效(它不起作用)。我试着在本地和google上链接到jQuery,但都没有成功。我试着在manifest.json中添加content_脚本,但当我重新加载应用程序时,它说content_脚本只允许用于扩展和遗留打包应用程序。我是不是遗漏了什么?

我发现了。不能有内联脚本,必须从外部链接到它们