Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery tab and content outside the current webpage
    primarykey
    data
    text
    <p>Bit of a silly question here but here goes... say I wish to use the jQuery tabs but instead of my tabs pointing to DIVs within the same page I want to point them to pages within my site or even external pages... for example</p> <pre><code>&lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="content/page1.html"&gt;Page 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#photos"&gt;Photos&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="content/page3.html"&gt;Page 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="content/page4.html"&gt;Page 4&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="profile"&gt; &lt;p&gt;Profile&lt;/p&gt; &lt;/div&gt; &lt;div id="photos"&gt; &lt;p&gt;Photos&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>For the tabs pointing to Page 3 and Page 4 would I have to use an IFrame or a Div with an iFrame within to display the desired content? For example</p> <pre><code>&lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="content/page1.html"&gt;Page 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#photos"&gt;Photos&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page3"&gt;Page 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page4"&gt;Page 4&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="profile"&gt; &lt;p&gt;Profile&lt;/p&gt; &lt;/div&gt; &lt;div id="photos"&gt; &lt;p&gt;Photos&lt;/p&gt; &lt;/div&gt; &lt;div id="page3"&gt; &lt;iframe&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; or &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="content/page1.html"&gt;Page 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#photos"&gt;Photos&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page3"&gt;Page 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page4"&gt;Page 4&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="profile"&gt; &lt;p&gt;Profile&lt;/p&gt; &lt;/div&gt; &lt;div id="photos"&gt; &lt;p&gt;Photos&lt;/p&gt; &lt;/div&gt; &lt;iframe id="page3"&gt;&lt;/iframe&gt; </code></pre> <p></p> <p>If this question makes no sense or my wording is bad please say and I'll improve my question.</p> <p><em><strong></em> UPDATE **</strong></p> <p>Sorry I should add that when using the original code (the first block) the tabs that reference pages and not DIVs are not shown when the user uses IE8. IE9 seems fine... my problem was risen when testing in IE8! However the first tab (pointing to Page1) is displayed when the page loads... when I click on the Page 3 or Page 4 links nothing is shown... </p>
    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.
    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