我用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