Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is a sample of how to mimic tab behaviour using navbar.It is a basic thing only and needs more work to make it perfect.But I think it can serve as a starting point.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;My Page&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt; &lt;script&gt; var prevSelection = "tab1"; $("#navbar ul li").live("click",function(){ var newSelection = $(this).children("a").attr("data-tab-class"); $("."+prevSelection).addClass("ui-screen-hidden"); $("."+newSelection).removeClass("ui-screen-hidden"); prevSelection = newSelection; }); &lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"&gt;&lt;/script&gt; &lt;style&gt; .tab-content{ width:100%; height:250px; background-color:white; border-bottom-left-radius:0.5em; border-bottom-right-radius:0.5em; } .tab-content&gt;div{ padding:5px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;My Title&lt;/h1&gt; &lt;/div&gt;&lt;!-- /header --&gt; &lt;div data-role="content"&gt; &lt;div data-role="navbar" id="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#" class="ui-btn-active" data-tab-class="tab1"&gt;Tab1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-tab-class="tab2"&gt;Tab2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-tab-class="tab3"&gt;Tab3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-tab-class="tab4"&gt;Tab4&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="tab-content"&gt; &lt;div class="tab1"&gt; Tab1 &lt;/div&gt; &lt;div class="tab2 ui-screen-hidden"&gt; Tab2 &lt;/div&gt; &lt;div class="tab3 ui-screen-hidden"&gt; Tab3 &lt;/div&gt; &lt;div class="tab4 ui-screen-hidden"&gt; Tab4 &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /content --&gt; &lt;/div&gt;&lt;!-- /page --&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>A demo here - <a href="http://jsfiddle.net/m8wQM/" rel="nofollow">http://jsfiddle.net/m8wQM/</a></p> <p>Let me know if it helps.</p>
 

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