我用Facebox去了,两个答案都很好,所以谢谢。 但是,我有以下问题:任何想法?
与Facebox,我收到原始文本时,我用它('#facebox .content')
选择器。它适用于('#facebox')
或('#facebox .popup')
。你们遇到过这个吗?通过原始输出,我的意思是:
$('#facebox .content').html("
\n Hello from box div\n<\/div> ");
这就是盒子里显示的内容。并仅限于.content选择器!
在application.js中我有:
$('a[rel*=facebox]').facebox(function($) {
$.getScript(this.href);
});
在我的控制器
:
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @project }
format.js {render :layout => false}
end
在我show.js.erb:
$('#facebox .content').html("<%= escape_javascript(render("spaces"))%>");
你提的问题是过于宽泛。你试过什么了?你卡在哪里?你的弹出代码现在是什么样的? – coreyward