简体   繁体   English

无法弄清楚为什么JS插件无法正常工作

[英]Can't figure out why JS plugin isn't working

I am trying to implement a JS modal window and have nearly copied the code for the plugin verbatim and it is still not working; 我正在尝试实现JS模态窗口,并且几乎逐字复制了插件的代码,但仍然无法正常工作; the following is my code... 以下是我的代码...

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="avgrund.css">
</head>
<body>
    <div class="buttons">
        <a href="#" id="show" class="button left">Show it</a>
    </div>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery
                            /1.7.2/jquery.min.js"></script>
    <script src="jquery.avgrund.js"></script>
    <script>
    $(function() {
        $('#show').avgrund({
            height: 200,
            holderClass: 'custom',
            showClose: true,
            showCloseText: 'Close',
            enableStackAnimation: true,
            onBlurContainer: '.container',
            template: '<p>So implement your design ' +
            'and place content here! If you want to ' +
            'close modal, please hit "Esc", click ' +
            'somewhere on the screen or use special ' +
            'button.</p>'
        });
    });
    </script>
</body>
</html>

The html file which contains this code is located in the same directory as all the required JS and CSS files. 包含此代码的html文件与所有必需的JS和CSS文件位于同一目录中。 I believe I've brought everything to the bare-bone basics but can't figure out why this isn't working; 我相信我已经将所有内容都纳入了基本知识,但无法弄清楚为什么它不起作用。 what am I missing? 我想念什么? Modal retrieved from http://labs.voronianski.com/jquery.avgrund.js/ http://labs.voronianski.com/jquery.avgrund.js/检索的模态

try replacing your avgrund script to this location , and if it works save it . 尝试将您的avgrund脚本替换到此位置,如果可行,请保存。

I have tested this and its working for me 我已经对此进行了测试,并为我工作

<script src="https://rawgithub.com/voronianski/jquery.avgrund.js/master/jquery.avgrund.min.js"></script>

demo http://jsfiddle.net/codingantGit/5j9zC/6/ 演示http://jsfiddle.net/codingantGit/5j9zC/6/

Perhaps you're adding up the invalid js files! 也许您要添加无效的js文件!

Valid js file: http://labs.voronianski.com/media/js/jquery.avgrund.js

Valid CSS: http://labs.voronianski.com/jquery.avgrund.js/avgrund.css

DEMO: http://jsfiddle.net/sunnykumar08/USD4Q/ 演示: http : //jsfiddle.net/sunnykumar08/USD4Q/

正斜杠并输入:

<script type="text/javascript" src="./jquery.avgrund.js"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 似乎无法弄清楚该脚本为何不起作用 - Can't seem to figure out why the script isn't working 无法弄清楚为什么它不起作用了 - Can't figure out why it isn't working, anymore 我不知道为什么我的石头,剪刀布游戏中的得分不起作用 - I can't figure out why the scoring isn't working in my rock, paper, scissors game 无法弄清楚为什么它不起作用。 javascript调用数据键 - Can't figure out why it isn't working. javascript calling data-key 似乎无法弄清楚为什么我的JavaScript无法在IE和Chrome中运行 - Can't seem to figure out why my javascript isn't working in IE and Chrome 无法弄清楚为什么javascript无法在我的php文件中工作 - Can't figure out why javascript isn't working in my php file 我无法弄清楚为什么我添加事件处理程序的简单尝试无效 - I can't figure out why my simple attempt at adding an event handler isn't working 经典的元音练习。 我不知道为什么我的for循环无法正常工作 - classic vowel exercise. I can't figure out why my for loop isn't working 无法弄清楚为什么我的change(...)事件处理程序在这种情况下不起作用 - Can't figure out why my change(…) event handler isn't working in this scenario 无法弄清楚为什么setTimeout()无法正常运行 - can't figure out why setTimeout() isn't functioning properly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM