Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Load will automatically filter out all but the body tag in the document. If you have your javascript in the head of the document, it won't be loaded with the document. Try moving your javascript into the body tag and see if that works.</p> <blockquote> <p>In jQuery 1.2 you can now specify a jQuery selector in the URL. Doing so will filter the incoming HTML document, only injecting the elements that match the selector. The syntax looks something like "url #some > selector". Default selector "body>*" always applies. If the URL contains a space it should be escape()d. See the examples for more information.</p> </blockquote> <p><strong>Updated based on comments</strong></p> <p>You'll need to load your CSS with your base page. Since the link tag must be in the head element, there isn't any (easy) way to load it via AJAX. You could add a link to the head of your document, but getting the href for the link would probably require a separate call or changing to return the link and html wrapped as a json object. Better to just include the CSS in the main document.</p> <p>I think if you returned just the following content from your AJAX call it ought to work.</p> <pre><code>&lt;ul id="gallery"&gt; &lt;li&gt;&lt;span class="panel-overlay"&gt;This is an overlay&lt;/span&gt;&lt;img src="img1.jpg" alt="test1" title="test1" /&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="panel-overlay"&gt;This is an overlay&lt;/span&gt;&lt;img src="img2.jpg" alt="test2" title="test2" /&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="panel-overlay"&gt;This is an overlay&lt;/span&gt;&lt;img src="img3.jpg" alt="test3" title="test3" /&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="panel-overlay"&gt;This is an overlay&lt;/span&gt;&lt;img src="img4.jpg" alt="test4" title="test4" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;script type="text/javascript"&gt; $(function() { $('#gallery').galleryView( { panel_width: 474, panel_height: 353, frame_width: 50, frame_height: 50, transition_speed: 350, easing: 'easeInOutQuad', transition_interval: 0 }); }); &lt;/script&gt; </code></pre>
 

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