Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.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
Javascript 为什么我的Jquery弹出插件不是';不行吗?_Javascript_Jquery_Jquery Plugins_Popup_Magnific Popup - Fatal编程技术网

Javascript 为什么我的Jquery弹出插件不是';不行吗?

Javascript 为什么我的Jquery弹出插件不是';不行吗?,javascript,jquery,jquery-plugins,popup,magnific-popup,Javascript,Jquery,Jquery Plugins,Popup,Magnific Popup,我正在使用这个放大的弹出式插件() 这是我最基本的html,我只想通过按钮在页面上打开一个弹出窗口 <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> </

我正在使用这个放大的弹出式插件()

这是我最基本的html,我只想通过按钮在页面上打开一个弹出窗口

<!DOCTYPE html>
<html lang="en-US">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    </script>-->
    <script src="./js/jquery-1.11.1.min.js"></script>
    <script src="./js/jquery.magnific-popup.js"></script>

    <title>Burn That Burger</title>
    <script type="text/javascript" src="js/javascript.js"></script>
    <link rel="stylesheet" type="text/css" href="normalize.css" media="all">
    <link rel="stylesheet" href="style/unsemantic-grid-responsive.css" />
    <link rel="stylesheet" type="text/css" href="style/style.css" media="all">

</head>

<body>
   <div id="popup">
    test pop up goes here
    </div>

    <button>create and show popup</button>

</body>

</html>

我认为你的身体标签有问题,应该是:

<body>
<div id="popup">
test pop up goes here 
</div>

测试弹出窗口出现在这里
jsiddle: 您已将弹出id应用于您的主体,而不是单独的div

<body>
<div id="popup">
    test pop up goes here 
</div>
<button> create and show popup </button>

测试弹出窗口出现在这里
创建并显示弹出窗口

你检查过Chrome(F12)的调试输出窗口中的错误吗?你的HTML有一些问题,有一个关闭的
div
没有打开的
div
谢谢大家,我把它改成了一个div,但仍然没有幸运的是,你的顶部似乎有一个断开的脚本标记
-->
。下面的JSFiddle工作得很好,因此显然您在常规页面结构方面还有其他问题。试着在Chrome F12调试工具下运行,看看它是怎么说的。如果你想解决这个问题,你还需要不断地向每个人的回复反馈信息。低活动性是新用户根本得不到任何答案的原因之一:)Argh。。。在柱子上被击败了。正在为magnific pop寻找一个JSFiddle:)
<body>
<div id="popup">
    test pop up goes here 
</div>
<button> create and show popup </button>