Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebox problem
    primarykey
    data
    text
    <p>Excuse me could someone send me a complete tutorial or post a example about of Facebox as its documentation is poor.</p> <p>My problem is that ajax request is OK but don´t show any popup with content.</p> <p>Perhaps I forgot steps.</p> <p>My code </p> <p>Application controller</p> <pre><code>class ApplicationController &lt; ActionController::Base include AuthenticatedSystem include RoleRequirementSystem include FaceboxRender ... end </code></pre> <p>Application layout</p> <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt; &lt;title&gt;&lt;%= configatron.site_name %&gt;&lt;/title&gt; &lt;%= stylesheet_link_tag "facebox" %&gt; &lt;%= stylesheet_link_merged :base %&gt; &lt;%= javascript_include_merged :base %&gt; &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"&gt;&lt;/script&gt; &lt;%= stylesheet_link_tag 'mobile' if mobile_device? %&gt; &lt;%= javascript_include_tag('jquery.simplemodal') %&gt; &lt;%= javascript_include_tag("jquery.form") %&gt; &lt;%= javascript_include_tag "facebox" %&gt; &lt;script type="text/javascript"&gt; $j = jQuery.noConflict(); jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() }) &lt;/script&gt; &lt;/head&gt; ... ... </code></pre> <p>index view</p> <pre><code>&lt;% content_for :header do %&gt;Lista de Pack&lt;% end %&gt; &lt;%= facebox_link_to "Ver packs", :url =&gt; {:controller =&gt; "packs", :action =&gt; "prueba"}, :method =&gt; :get -%&gt; </code></pre> <p>prueba view</p> <pre><code>&lt;div id="pack-list"&gt; &lt;h1&gt;HOLA&lt;/h1&gt; &lt;/div&gt; </code></pre> <p>packs controller</p> <pre><code> def index end def prueba @packs = Pack.paginate :page =&gt; params[:page], :per_page =&gt; 5 respond_to do |format| format.html format.js { render_to_facebox } end end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload