Assalammualaikum
Smiley ^_^
Dah lama tak buat tutorials. Accordian Navbar tu menu tab. Bila kita touch dia pakai cursor ,
automatik dia akan jatuh. Bukan jatuh terhempap tu !
BEFORE
AFTER
Dah lama tak buat tutorials. Accordian Navbar tu menu tab. Bila kita touch dia pakai cursor ,
automatik dia akan jatuh. Bukan jatuh terhempap tu !
BEFORE
AFTER
1) Dashboard > Design > Edit HTML > F3 search this code.
ABC : untuk warna tulisan navbar
ABC : background navbar
ABC : background isi navbar
ABC : pilihlah tajuk apa yang korang nak letak
ABC : letaklah segala kod yang korang nak
]]></b:skin>2) Copy and paste atas code ]]></b:skin> .
ul.tabs {3) Belum siap ! Copy and paste code ni kat bawah code ]]></b:skin>
margin: 0;
padding: 0;
float: left;
list-style: none;
height: 300px; /*--Set height of tabs--*/
border-bottom: 1px solid #999;
border-left: 1px solid #999;
width: 100%;
}
ul.tabs li {
float: left;
margin: 0;
padding: 0;
height: 150px; /*--Subtract 1px from the height of the unordered list--*/
line-height: 300px; /*--Vertically aligns the text within the tab--*/
border: 1px solid #999;
border-left: none;
margin-bottom: -1px; /*--Pull the list item down 1px--*/
overflow: hidden;
position: relative;
background: #e0e0e0;
}
ul.tabs li a {
text-decoration: none;
color: #000;
display: block;
font-size: 1.2em;
padding: 0 20px;
border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
outline: none;
}
ul.tabs li a:hover {
background: #ccc;
}
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: #fff;
border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
}
.tab_container {
border: 1px solid #999;
border-top: none;
overflow: hidden;
clear: both;
float: left; width: 100%;
background: #fff;
}
.tab_content {
padding: 20px;
font-size: 1.2em;
}
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js' type='text/javascript'/>4) Preview dulu baru save. WAIT ! Belum habis lagi. Pergi Page Elements > Add Gadget > HTML/Javascript > Copy and paste code kat bawah ni kat dalam HTML/Javascript.
<script>
$(document).ready(function() {
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content
//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});</script>
<style type="text/css">
h5 {
font-family: trebuchet-ms, arial, tahoma;
font-size: 13px;
padding: 0 0 1em;
font-weight:bold;
color: #ffffff;
}
.msg_list {
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
.msg_head {
padding: 5px 10px;
cursor: pointer;
position: relative;
background-color:#FFB6D6;
margin:1px;
-moz-border-radius: 35px;
border-radius: 35px;
}
.msg_body {
padding: 5px 10px 15px;
background-color:#FFFFFF;
}
</style>
<script type="text/javascript" src="https://sites.google.com/site/jquery01/tabmenuaccordion.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
//hide the all of the element with class msg_body
$(".msg_body").hide();
//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked
$("#firstpane h5.msg_head").click(function()
{
$(this).next("div.msg_body").slideToggle(700).siblings("div.msg_body").slideUp("slow");
});
//slides the element with class "msg_body" when mouse is over the paragraph
$("#secondpane h5.msg_head").mouseover(function()
{
$(this).next("div.msg_body").slideDown("slow").siblings("div.msg_body").slideUp("slow");
});
});
</script>
<div class="msg_list" id="secondpane">
<h5 class="msg_head">Tajuk 1</h5>
<div class="msg_body">
<center>
Isi dalam tajuk 1</div>
<h5 class="msg_head">Tajuk 2</h5>
<div class="msg_body">
Isi dalam tajuk 2
</div>
<h5 class="msg_head">Tajuk 3</h5>
<div class="msg_body">
Isi dalam tajuk 3</div>
</div>
ABC : untuk warna tulisan navbar
ABC : background navbar
ABC : background isi navbar
ABC : pilihlah tajuk apa yang korang nak letak
ABC : letaklah segala kod yang korang nak
9 comments:
thanks for this tuto,lame dah cari sebenarnya,hehe...boleh tengok hasil di http://giveaway-only.blogspot.com/
wah..menjadi..nice tuto.. (:
Thanks...Alhamdulillah sebab menjadi...
kenapa tak jadi? :(
Hah ? Tak jadi ? Hurm, macam mana yekk ??
Thanks for the tutorial :) Berguna sangat! Saya nak re-post ye ^^ Jgn risau, always letak credit :D
OK ^^
Tuto yang berguna.
Thanks ^_^
Post a Comment