Tutorial Memasang Menu Accordion







PaGe



shout box




add me




Langkah-langkah memasangnya menu accordion:

1. Sign blog anda
2. Klik Design.
3. Klik Add a Gadget.
4. Klik HTML / Javascript.
5. Copy kod dibawah ini, paste pada kotak HTML / Javascript.



<style type="text/css">
h5 {
font-family: arial, trebuchet-ms, tahoma;
font-size: 13px;
font-weight:bold;
padding: 0 0 1em;

color: #ffffff;
}
.msg_list {
list-style: none;
padding: 0;
margin: 0;
width: 100%;
}
.msg_head {
padding: 5px 10px;
cursor: pointer;
position: relative;
margin:1px;
background-color: #9932CC;
}
.msg_body {
padding: 5px 10px 15px;
background-color:url(http://1.bp.blogspot.com/-qe2nCCU10Xc/Ta09TGqzoxI/AAAAAAAAACc/Cz14fOao5ek/s1600/kupu+ungu.gif);
}
</style>

<script type="text/javascript" src=" https://sites.google.com/site/teknikbuatblog/tbb/menuaccordion.js?attredirects=0&d=1 "></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">
Letakkan kod disini.

</div>

<h5 class="msg_head">Tajuk 2</h5>
<div class="msg_body">
Letakkan kod disini.

<h5 class="msg_head">Tajuk 3</h5>
<div class="msg_body">
Letakkan kod disini.

</div>
</div>

Nota :
Teks warna biru, warna background tajuk, teks warna ungu Url image,teks warna merah tajuk widget dan teks oren kod Html.

0 comments:

TinGaLkan Jejak