jqmodal 与 data-ajax-url 不起作用
我正在尝试在 http://communitychessclub.com/test-me.php 实现 jquery jqmodal我的努力基于 http://dev.iceburg.net/jquery/jqModal/ 2.AJAX,但是好像不起作用,点击没有任何反应。另外,我认为 #dialog 不起作用,因为我有不止一款游戏要弹出。有什么想法吗?
<li class="showDialog" id="dialog" data-ajax-url="games/game1256.php">
<img src="http://d1uzlzehxkwcgj.cloudfront.net/game1256-8.png"></li>
<script src="js/jqModal-min.js"></script>
<script>
$().ready(function(){
$('#dialog').jqm({
ajax: '@data-ajax-url',
modal: true,
trigger: 'li.showDialog'});
});
});
</script>
I am trying to implement jquery jqmodal at http://communitychessclub.com/test-me.php and am basing my effort on the example at http://dev.iceburg.net/jquery/jqModal/ 2. AJAX, but it doesn't seem to work, nothing happens on click. Also, I don't think #dialog will work because I have more than one game to popup. Any ideas?
<li class="showDialog" id="dialog" data-ajax-url="games/game1256.php">
<img src="http://d1uzlzehxkwcgj.cloudfront.net/game1256-8.png"></li>
<script src="js/jqModal-min.js"></script>
<script>
$().ready(function(){
$('#dialog').jqm({
ajax: '@data-ajax-url',
modal: true,
trigger: 'li.showDialog'});
});
});
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然没有错误,但不建议使用
$().ready(handler)
快捷方式,但看起来你也有一些语法错误:应该这样写:
在
li.showDialog
之后你有一个额外的});
应该是已删除Although not incorrect, the
$().ready(handler)
shortcut is not recommended, but it looks like you have a few syntax errors as well:should be written like this:
You have an extra
});
afterli.showDialog
that should be removed