jQuery Mobile Navigation Tabs

Kali ini saya lagi bikin player yang ada playlist beberapa kategori lagu, kemudian tiap kategori saya bikin navigasi berupa tab agar tidak memakan banyak tempat. Coba cari di google “jquery mobile menu tab” Alhamdulilah nemu di stackoverflow,

Scriptnya :

<style type='text/css'>
        #a, #b {
        display: none;
<script type='text/javascript'>//<![CDATA[ 
$('div[data-role="navbar"] a').bind('click', function () {
    $('div#' + $(this).attr('data-href')).show();



    <div data-role="content">
        <div data-role="navbar">
                <li><a href="#" data-href="a">One (A)</a></li>
                <li><a href="#" data-href="b">Two (B)</a></li>
        </div><!-- /navbar -->
        <div class="content_div">onLoad Content</div>
        <div id="a" class="content_div">Some 'A' Content</div>
        <div id="b" class="content_div">Some 'B' Content</div>

screenshot :
jquery navigation tab

sumber : http://stackoverflow.com/questions/6849019/jquery-mobile-navigation-tabs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s