Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery-ui .tabs ajax load specific content of page?
    primarykey
    data
    text
    <p>I'm trying to use jQuery UI's .tabs() to obtain content via AJAX, but the default behavior is to grab the entire page's content. <strong>How would I obtain content from a specific #id and/or multiple #id's?</strong> </p> <p>I have a feeling I will need to use the <code>load:</code> event (<a href="http://docs.jquery.com/UI/Tabs#event-load" rel="nofollow noreferrer">http://docs.jquery.com/UI/Tabs#event-load</a>), but <em>I need an assist figuring this out</em>.</p> <p>Example:</p> <p>The Page with the tabs that is getting and displaying the tabbed content. I have placed #content after the first #the_tabs link to retrieve in an attempt to obtain that specific region of the content, but the entire page is still loaded.</p> <pre><code>&lt;div id="tabs"&gt; &lt;div id="tabs_display"&gt; &lt;/div&gt; &lt;ul id="the_tabs"&gt; &lt;li&gt;&lt;a href="testcontent.html#content" title="tabs display"&gt;&lt;span&gt;1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="testcontent2.html" title="tabs display"&gt;&lt;span&gt;2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="testcontent.html" title="tabs display"&gt;&lt;span&gt;3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="testcontent2.html" title="tabs display"&gt;&lt;span&gt;4&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- /#tabs --&gt; </code></pre> <p>The page being retrieved by the previous markup:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Remote HTML Page Example&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="content"&gt; I want this content &lt;/div&gt; &lt;div id="other_stuff"&gt; Not this content &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>the JS (for setup purposes):</p> <pre><code>$(document).ready(function(){ /* Tabs --------------------*/ $(function() { var $tabs = $('#tabs').tabs({ }); }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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