从 JavaScript 函数启动 jquery Facebox?
我在函数内部使用它,
document.getElementById("DeleteConfirmationdiv").style.display = 'block';
现在我想使用 jQuery Facebox 启动这个 DeleteConfirmationdiv
插件。是否可以?
到目前为止,我一直在使用这样的facebox,
$(document).ready(function($) {
$.facebox.settings.opacity = 0.2;
$('a[rel*=facebox]').facebox();
});
我的页面有这个,
<a id="signin" href="#signindiv" rel="facebox">
<img alt="" src="Css/images/Sign in.png" height="19" width="59" />
</a>
我尝试了这个,但它不起作用,
function showDisplaydiv() {
$.facebox.settings.opacity = 0.2;
$('#ConfirmationPanel').facebox();
//document.getElementById("ConfirmationPanel").style.display = 'block';
document.getElementById("datatable").style.display = 'block';
document.getElementById("ImageButtonDiv").style.display = 'block';
document.getElementById("adddiv").style.display = 'none';
return false;
}
我从一个按钮调用这个函数,
<asp:Button ID="Delete" runat="server" CssClass="deletebuttons"
OnClientClick="javascript:return(Deleteyuitable()&&showDisplaydiv(''));"
onfocus="this.blur();" Text="" />
I use this inside a function,
document.getElementById("DeleteConfirmationdiv").style.display = 'block';
now I want to launch this DeleteConfirmationdiv
using the jQuery Facebox plugin. Is it possible?
Thus far I've been using facebox like this,
$(document).ready(function($) {
$.facebox.settings.opacity = 0.2;
$('a[rel*=facebox]').facebox();
});
and my page has this,
<a id="signin" href="#signindiv" rel="facebox">
<img alt="" src="Css/images/Sign in.png" height="19" width="59" />
</a>
I tried this but it doesn't work,
function showDisplaydiv() {
$.facebox.settings.opacity = 0.2;
$('#ConfirmationPanel').facebox();
//document.getElementById("ConfirmationPanel").style.display = 'block';
document.getElementById("datatable").style.display = 'block';
document.getElementById("ImageButtonDiv").style.display = 'block';
document.getElementById("adddiv").style.display = 'none';
return false;
}
i call this function from a button,
<asp:Button ID="Delete" runat="server" CssClass="deletebuttons"
OnClientClick="javascript:return(Deleteyuitable()&&showDisplaydiv(''));"
onfocus="this.blur();" Text="" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经让它工作了,
只是这样做了,
I ve got it to work,
Just did this,