[英]Reveal: jQuery Modal Plugin Won't Appear
I'm trying to use Reveal by Zurb to display a form, yet when I select the item that triggers the event the screen darkens like Reveal is working, but it will not show the pane. 我正在尝试使用Zurb的Reveal显示表单,但是当我选择触发事件的项目时,屏幕变暗,就像Reveal在起作用,但不会显示窗格。 Any ideas?
有任何想法吗? Thanks a lot for the help!
非常感谢您的帮助!
Planner.js Planner.js
$(function() {
$('.event_list li').click( function(e) {
console.log(this.id);
$('#update_view_content').reveal('http://example.com/user/planner/update/'+this.id);
});
$('#updateForm').live('submit', function() {
var data = $('#updateForm').serialize();
var url = $(this).attr('action');
$.post(url, data);
return false;
});
});
From looking at the documentation online it seems there are no parameters for the reveal()
method - the reveal method just shows a div on the screen, so 从在线查看文档来看,
reveal()
方法似乎没有任何参数-揭示方法仅在屏幕上显示div,因此
You would created markup on your page : 您将在页面上创建标记:
<div id="myModal" class="reveal-modal">
<h1>Modal Title</h1>
<p>Any content could go in here.</p>
<a class="close-reveal-modal">×</a>
</div>
then reveal it ... 然后揭示它...
$('#myButton').click(function(e) {
e.preventDefault();
$('#myModal').reveal();
});
If you want to load something into the div and then reveal i suggest this approach : 如果您想将某些内容加载到div中然后显示,我建议采用这种方法:
$('.event_list li').click( function(e) {
console.log(this.id);
$('#update_view_content').load('http://example.com/user/planner/update/'+this.id,function() {
$('#update_view_content').reveal();
});
});
That should load in the contents and then once the load has completed call the reveal method. 那应该加载内容,然后在加载完成后调用reveve方法。 untested
未经测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.