[英]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.