Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've created a <strong>fiddle</strong> here: <a href="http://jsfiddle.net/garreh/cfmvE/" rel="nofollow">http://jsfiddle.net/garreh/cfmvE/</a></p> <p>Should get you started in the right direction. If you want to use jQuery UI tabs, take a look at the million examples around the internet. However, what your trying to do is very simple and can be achieved easily with the attached fiddle. It's very easy to add ajax into the code.</p> <pre><code>&lt;div id="tab_container"&gt; &lt;div class="tab_content tab_1 tab_active"&gt; What's your name?&lt;br/&gt;&lt;br/&gt; &lt;input type="text"/&gt; &lt;/div&gt; &lt;div class="tab_content tab_2"&gt; Some other question &lt;/div&gt; &lt;div class="tab_content tab_3"&gt; A final question blah &lt;/div&gt; &lt;/div&gt; &lt;div id="tabs"&gt; &lt;a href="#" tab="1"&gt;Question 1&lt;/a&gt; &lt;a href="#" tab="2"&gt;Question 2&lt;/a&gt; &lt;a href="#" tab="3"&gt;Question 3&lt;/a&gt; &lt;/div&gt; </code></pre> <p>jQuery:</p> <pre><code>$('#tabs &gt; a').click(function() { var $tab = $('.tab_' + $(this).attr('tab')); if ($tab.length) { // Hide active tab &amp; selected style: $('.tab_active').removeClass('tab_active'); $('#tabs .active').removeClass('active'); // Show clicked tab content $tab.addClass('tab_active'); // Set tab styling $(this).addClass('active'); } }); </code></pre> <p>CSS available on the fiddle.</p> <hr> <p><strong>Edit:</strong></p> <p>Here's another <strong>fiddle</strong> demonstrating tabs using just HTML using the hyperlink anchor trick. Javascript not required: <a href="http://jsfiddle.net/garreh/6e2w5/" rel="nofollow">http://jsfiddle.net/garreh/6e2w5/</a></p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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