Kali ini saya akan memberikan tutorial membuat menu accordion tanpa harus masuk ke Edit HTML. Awalnya kedua template tersebut menggunakan simple accordion dari dezinerfolio, belakangan ini tidak berfungsi. Sampai sekarang saya tidak tahu kenapa, padahal semua javascriptnya sudah saya ganti dengan yang baru. Akhirnya saya menemukan accordion menu yang lebih sederhana, tidak perlu masuk ke Edit HTML, tinggal masuk ke layout kemudian pilih HTML/Javascript, letakkan kodenya disitu.... sudah jadi menu accordionnya.
Salah satu fungsi dari accordion menu selain memperingkas tampilan blog, juga dapat memperindah blog, seperti juga fungsi tabber atau tab view, jadi blog Anda akan kelihatan lebih ringkas dan rapi. Tutorial ini sudah agak lama, saya hanya memperbaharui tampilan menunya saja. Anda bisa letakkan menu accordion ini pada sidebar blog. Bagi teman-teman yang mau mencoba, berikut ini cara membuatnya (wah bahasanya jadul banget ya) :
- Login ke Blogger dengan akun Anda
- Masuk ke Layout, pilih HTML/Javascript
- Kemudian masukkan kode berikut ini ke dalamnya (kek bikin masakan aja) :<style type="text/css">
#accordion{width:100%;margin:auto;border:0px solid white}
#accordion h2{padding:5px 10px;background-color:#ccc;background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5HYQYtHz9F49Vru82vThNoXx1XYcLwwMriqiVIxk_b4hAoiylE8X0d0G7GVeJFJB-hcUGQDojgMw5eAjFIxUJfxRQEUbOneeDQGVKCTMteaBEzJOnERfAXUfDD2Gu-QflBVYPXBc3rDI/s1600/arrow_right.gif);background-repeat: no-repeat;background-position: right center;color:#000;font:normal 11px Tahoma;border-bottom:1px solid #FFF;cursor:pointer;}
#accordion .content{font:normal 11px Arial;padding:5px 10px;background:#eee;}
#accordion .content ul {list-style:none;margin:0 0 0;padding:0 0 0;}
#accordion .content li {background-image: url(); background-repeat: no-repeat;background-position: left center;margin:0;padding:2px 0 3px 0;text-indent:0px;border-bottom:1px dotted #ccc;line-height:1.3em;}
#accordion .content li a:hover {text-decoration:none;color:#000;}
#accordion h2.active{background-color:#bbb;background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpgOlpnwQb8V0Q2haCWUEzyqD_7gDDE2XMJswLu1zocRHx4yeSIgGSRZFJ2IlT-hhCnUDAYh0D6ZusFvDDcp6kD5Wsy-InnW6oNoR3WHKqXflxycqimN99dcw3GWdp-bZqyk-gXDMEBZ0/s1600/arrow_down.gif);background-repeat: no-repeat;background-position: right center;font-weight:bold;}
</style>
<script type="text/javascript" src="http://yourjavascript.com/121511228073/accordion-menu.js"></script>
<script type='text/javascript'>
$(function() {
$('#accordion .content').hide();
$('#accordion h2:first').addClass('active').next().slideDown('slow');
$('#accordion h2').click(function() {
if($(this).next().is(':hidden')) {
$('#accordion h2').removeClass('active').next().slideUp('slow');
$(this).toggleClass('active').next().slideDown('slow');
}
});
});
</script>
<div id="accordion">
<h2>Title 1</h2>
<div class="content">
Isi konten 1
</div>
<div id="accordion">
<h2>Title 2</h2>
<div class="content">
Isi konten 2
</div>
<div id="accordion">
<h2>Title 3</h2>
<div class="content">
Isi konten 3
</div>
<div id="accordion">
<h2>Title 4</h2>
<div class="content">
Isi konten 4
</div>
<div id="accordion">
<h2>Title 5</h2>
<div class="content">
Isi konten 5
</div>
</div></div></div></div></div> - Terakhir Save, lihat hasilnya
Keterangan :
- Title : Judul heading menu accordion
- Isi konten : Silahkan Anda isi dengan widget yang akan dipasang (bisa tulisan, script iklan maupun script widget)
<style type="text/css">
#accordion{width:100%;margin:auto;border:0px solid white} #accordion h2{background-color:#5f5e5e;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ynRItRrdmdWe3ZoCl0qAJp9YkcS2HuyFhNp93loZ1XMD2WaOxdLfGVmVfVneJHuYht5kD_SNjgPtNpz-9FCync189MRnBL3uvYNUMFCHF8nBE1iObgHw4yHlkutzvnLIKzIRbVzmjNU/s1600/arrow_right.gif);background-repeat:no-repeat;background-position:right center;color:#d0cfce;font:normal 11px Tahoma;border-bottom:1px solid #323333;cursor:pointer;padding:5px 10px} #accordion .content{font:normal 11px Arial;background:#333;padding:5px 10px} #accordion .content li{background-image:url();background-repeat:no-repeat;background-position:left center;text-indent:0;border-bottom:1px dotted #595959;line-height:1.3em;margin:0;padding:2px 0 3px} #accordion .content li a:hover{text-decoration:none;color:#ff3c00} #accordion h2.active{background:#5f5e5e;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgesMQ4SvDWGrFGa2ydw1z1VFBao1RzWugKtxHh88q8u2HDJkzoDIUd7zNb1hZosDkBBKX9eV_SdmpkhG4yF5a7Iwty84AB7h2F6sfX5lzfMQyBCGyeVVD0hCmmqAd0R_8kYwNRCgZWdwk/s1600/arrow_down.gif);background-repeat:no-repeat;background-position:right center;font-weight:700} </style>
<script type="text/javascript" src="http://yourjavascript.com/121511228073/accordion-menu.js"></script>
<script type='text/javascript'>
$(function() {
$('#accordion .content').hide();
$('#accordion h2:first').addClass('active').next().slideDown('slow');
$('#accordion h2').click(function() {
if($(this).next().is(':hidden')) {
$('#accordion h2').removeClass('active').next().slideUp('slow');
$(this).toggleClass('active').next().slideDown('slow');
}
});
});
</script>
<div id="accordion">
<h2>Title 1</h2>
<div class="content">
Isi konten 1
</div>
<div id="accordion">
<h2>Title 2</h2>
<div class="content">
Isi konten 2
</div>
<div id="accordion">
<h2>Title 3</h2>
<div class="content">
Isi konten 3
</div>
<div id="accordion">
<h2>Title 4</h2>
<div class="content">
Isi konten 4
</div>
<div id="accordion">
<h2>Title 5</h2>
<div class="content">
Isi konten 5
</div>
</div></div></div></div></div>
#accordion{width:100%;margin:auto;border:0px solid white} #accordion h2{background-color:#5f5e5e;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ynRItRrdmdWe3ZoCl0qAJp9YkcS2HuyFhNp93loZ1XMD2WaOxdLfGVmVfVneJHuYht5kD_SNjgPtNpz-9FCync189MRnBL3uvYNUMFCHF8nBE1iObgHw4yHlkutzvnLIKzIRbVzmjNU/s1600/arrow_right.gif);background-repeat:no-repeat;background-position:right center;color:#d0cfce;font:normal 11px Tahoma;border-bottom:1px solid #323333;cursor:pointer;padding:5px 10px} #accordion .content{font:normal 11px Arial;background:#333;padding:5px 10px} #accordion .content li{background-image:url();background-repeat:no-repeat;background-position:left center;text-indent:0;border-bottom:1px dotted #595959;line-height:1.3em;margin:0;padding:2px 0 3px} #accordion .content li a:hover{text-decoration:none;color:#ff3c00} #accordion h2.active{background:#5f5e5e;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgesMQ4SvDWGrFGa2ydw1z1VFBao1RzWugKtxHh88q8u2HDJkzoDIUd7zNb1hZosDkBBKX9eV_SdmpkhG4yF5a7Iwty84AB7h2F6sfX5lzfMQyBCGyeVVD0hCmmqAd0R_8kYwNRCgZWdwk/s1600/arrow_down.gif);background-repeat:no-repeat;background-position:right center;font-weight:700} </style>
<script type="text/javascript" src="http://yourjavascript.com/121511228073/accordion-menu.js"></script>
<script type='text/javascript'>
$(function() {
$('#accordion .content').hide();
$('#accordion h2:first').addClass('active').next().slideDown('slow');
$('#accordion h2').click(function() {
if($(this).next().is(':hidden')) {
$('#accordion h2').removeClass('active').next().slideUp('slow');
$(this).toggleClass('active').next().slideDown('slow');
}
});
});
</script>
<div id="accordion">
<h2>Title 1</h2>
<div class="content">
Isi konten 1
</div>
<div id="accordion">
<h2>Title 2</h2>
<div class="content">
Isi konten 2
</div>
<div id="accordion">
<h2>Title 3</h2>
<div class="content">
Isi konten 3
</div>
<div id="accordion">
<h2>Title 4</h2>
<div class="content">
Isi konten 4
</div>
<div id="accordion">
<h2>Title 5</h2>
<div class="content">
Isi konten 5
</div>
</div></div></div></div></div>



9 komentar:
What a material of un-ambiguity and preserveness of precious knowledge
regarding unpredicted emotions.
Feel free to visit my page financing options
An intriguing discussion is worth comment. There's no doubt that that you ought to publish more about this issue, it may not be a taboo matter but usually people do not discuss such subjects. To the next! Best wishes!!
my web-site - homepage
Hey! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My web site looks weird when browsing from my iphone4. I'm trying to
find a theme or plugin that might be able to correct this problem.
If you have any recommendations, please share. With thanks!
my web page ... how to cure sleep acnea
Excellent post. I was checking constantly this blog and I am impressed!
Very helpful info specifically the last part :) I care for such
info a lot. I was looking for this certain information for
a very long time. Thank you and good luck.
Here is my website: atlanta business coach
I'm really impressed with your writing skills and also with the
layout on your weblog. Is this a paid theme or did you customize it yourself?
Either way keep up the excellent quality writing, it is rare to see a great blog like this one today.
Here is my website; Drob sarma
Im Großen und Ganzen ist es bei dem Punkt Blogger: Jcow Besaba für mich sehr wichtig, dass die Artikel bis ins kleinste Detail kontrolliert werden, damit man nichts falsch versteht.
Genau das scheint auf dieser Website auf jedenfall Usus zu sein.
Deswegen stöbere ich hier unter anderem oftmals sehr gerne.
Here is my site :: aaa (http://www.mixcloud.com/)
We аbsolutely lovе уоur blоg and finԁ
nearly all of your рοst's to bе exаctlу ӏ'm looκing for.
Doess one οffer guest writеrs tto ωrіte content for you ρeгsοnally?
I wouldn't mind producing а post or elаbοratіng
on ѕome of the subjects you write rеlated tо
here. Again, awesome website!
Feel free to visit my blog ... phen375 in stores -
,
Ӏ knoω tthis web ρage giѵes quality dependent posts аnd additional stuff, іs there any
οther website whіch presents thеse kinds оf іnformation іn quality?
mу werbsite :: how to get your ex boyfriend back
Ӏt's hard to find knowledgeable peope аbout thіs topic, but you
seem lіke yoou know whɑt yoս'rе talking ɑbout!
Ƭhanks
Visut mү site :: how to get your ex back case study proof system works
Peraturan Berkomentar :
✔ Berkomentarlah Sesuai Artikel Diatas
✔ Untuk Berkomentar Gunakan (OpenID / Name URL / Google+)
✔ Berkomentarlah Menggunakan Bahasa Yang Jelas
✔ Relevan
✔ Sopan
✖ SPAM
✖ Link Aktif (Live Link)
✖ Promosi (Iklan)
✖ OOT (Out Of Topic)