Tutorial : Navigation Tab #6

Sidebar 3 tab in 1 yang mana ekk ? Hmm , tekan sini , keluar ini , tekan situ ehh keluar ini... Tekan jerawat , awww sakit lah ! ! Dusss ! kan dah dapat :P , Susah untuk dikatakan . tengok preview ini
Preview :
Haa , nampak tak ? Ada siapa-siapa nak cuba pasang.. Meyh follow step by step tuto ini ! :D
1. Dashboard --> Template --Edit Html -->
2. Find this code : 
]]></b:skin> 
3. Copy this code and paste code above ]]></b:skin> 
ul.tabs li {
float: left;
margin: 0;
padding: 0;
height: 31px; /*--Subtract 1px from the height of the unordered list--*/
line-height: 31px; /*--Vertically aligns the text within the tab--*/
border-left: none;
margin-bottom: -1px; /*--Pull the list item down 1px--*/
overflow: hidden;
position: relative;
}
ul.tabs li a {
font-weight: bold;
color: #000;
display: block;
font-size: 10px;
padding: 0 20px;
border: 2px solid #FFF; /*--Gives the bevel look with a 1px white border inside the list item--*/
outline: none;
}
ul.tabs li a:hover {
background: #ECE0F8;
}
html ul.tabs li.active, html ul.tabs li.active a:hover { /*--Makes sure that the active tab does not listen to the hover properties--*/
background: #ECE0F8;
border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
}
.tab_container {
overflow: hidden;
clear: both;
float: left; width: 98%;
background:#ffffff;
 background-attachment:fixed;
}
.tab_content {
padding: 2px;
height :260px;
}
4. Then , pergi cari kod
</head>
5. Copy and paste code ini above </head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js' type='text/javascript'/>
<script>
$(document).ready(function() {
$(&quot;.tab_content&quot;).hide(); //Hide all content
$(&quot;ul.tabs li:first&quot;).addClass(&quot;active&quot;).show(); //Activate first tab
$(&quot;.tab_content:first&quot;).show(); //Show first tab content
//On Click Event
$(&quot;ul.tabs li&quot;).click(function() {
$(&quot;ul.tabs li&quot;).removeClass(&quot;active&quot;); //Remove any &quot;active&quot; class
$(this).addClass(&quot;active&quot;); //Add &quot;active&quot; class to selected tab
$(&quot;.tab_content&quot;).hide(); //Hide all tab content
var activeTab = $(this).find(&quot;a&quot;).attr(&quot;href&quot;); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});</script>
5. Preview , kalau tak ada error , save :D
6. Next , Go to --> Layout --> Add A Gadget --> Choose Edit Html/JavaScript
7. Copy and paste this code :
<ul class="tabs">
<li><a href="#tab1">Owner</a></li>
<li><a href="#tab2">Contact</a></li>
<li><a href="#tab3">Shout</a></li>
</ul>
<div class="tab_container">
<div id="tab1" class="tab_content">
Tab 1 Content
</div>
<div id="tab2" class="tab_content">
Tab 2 Content
</div>
<div id="tab3" class="tab_content">
Tab 3 Content
</div>
</div>
 EDIT :
ABC : Tukar warna background tab sini 
ABC : Tajuk Tab
ABC : Coding / Stuff /isi-isi mengikut tajuk tab

8. Preview.. If Doesn't Error Save !
Hmm , macam mana ? Jadi ke tidak ? harap-harap menjadi ! :D


7 comments

  1. Bagus tuto ni. Bleh try nnti. Hehe

    ReplyDelete
  2. Nurul buat tutorial tentang google+ sebab ramai yg dah buat tapi bila kakak cuba klik tak ada link mereka. Sedih sebab tak dapat jejak mereka balik - bimbang dikata sombong kan.

    ReplyDelete
  3. @KakzakieHmm, Insya'Allah nanti Nurrul share kan yer :D

    ReplyDelete
  4. @Nur Madihah Terima kasih sbb bgi respon.. sy baru perasan ada coding yg tertinggal.. btw , awk boleh cuba buat semula.. sy dah betulkan :D

    ReplyDelete
  5. yeay ! jadi Alhamdulillah. thanks nurul. lame carik tuto ni ^^ boleh tengok kat blog kite

    http://caeshashi.blogspot.com/

    ReplyDelete

Terima kasih kerana sudi menulis komen di blog Nurrul, sebarang pertanyaan akan dibalas secepatnya. Jazakallahu khairan