Kelebihan daftar isi dengan Jquery ini adalah pada tampilannya yang cukup menarik. Jika Anda ingin memasangnya di blog ikuti dan simak langkah-langkahnya berikut ini :
1. Login akun blogger Anda.
2. Pilih Template > Edit HTML > centang 'Expand Template Widget'.
3. Letakkan kode berikut diatas kode ]]></b:skin>
#dafis-acc{
font-family:"Trebuchet MS", Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#333;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvRAPEeXWj7liol7eKCL4PdF4gLVE-BXG5zqLREHY7ixjCwjOt3-wPVJlndze6ehpi7ERDSKbK4NMakRCHK_C6NPeIUOVJF1cLUcvhpQWLXf3jIXze1bmm5zXxjhFtDbBJNLJiHhRo0WM/s320/bg5.gif) repeat-y scroll left center #E7F7FB;
padding:2px 0;
border:1px solid #339DC6;
}
.dafis-label{
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2V4eZgU8gLiiyJ3kG7IcEe7_dBqys4DwmUq_9ScY60DE6jKhhmcDpNPnu-MwiQN0bjjOPJErYZ_UgOuyd0-DuCO8fmtTvQR7zudX5exkKN-8hM1W4WZEWQE_FgL6rMuBEm1LFzl34BkY/s1600/bg4.gif) repeat-x scroll 0 0 #E1F4FB;
font-weight:bold;
line-height:1.4em;
overflow:hidden;
white-space:nowrap;
vertical-align: baseline;
margin: 1px 3px;
outline: none;
cursor: pointer;
text-decoration: none;
padding: 2px 10px;
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
border:1px solid #2F94BA;
}
.dafis-label:hover{
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6PdN7EnIBh_9Ol9mrJEsAOCR7QSXMQ8_xRr2kD9cILfehF_kDLPRqkrdtg3_jwBQQgi765uZNWYpcyrpyxTail7Gh8mQ6KOqJmCHIgQ3Osuxy4Xoq9ApQsOl1hiT_WmfPIECr7l9XEeU/s320/bg2.gif) repeat-x scroll 0 0 #E1F4FB;
color:#003366;
}
.dafis-daf ol{
margin:0 0 0 30px !important;
padding:0 !important;
}
.dafis-daf ol li{
background-color:#C9E9F4;
line-height:1.5em;
margin:1px 3px !important;
white-space:nowrap;
text-align:left;
border:1px solid #339DC6;
}
.dafis-daf ol li a{
text-decoration: none !important;
color:#333 !important;
display:block;
padding-left:10px;
}
.dafis-daf ol li a:hover{
background: #7BC4DF;
border-left: 5px #333 solid;
padding-left: 5px;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
4. Kemudian letakkan juga kode berikut diatas kode </head> font-family:"Trebuchet MS", Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#333;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvRAPEeXWj7liol7eKCL4PdF4gLVE-BXG5zqLREHY7ixjCwjOt3-wPVJlndze6ehpi7ERDSKbK4NMakRCHK_C6NPeIUOVJF1cLUcvhpQWLXf3jIXze1bmm5zXxjhFtDbBJNLJiHhRo0WM/s320/bg5.gif) repeat-y scroll left center #E7F7FB;
padding:2px 0;
border:1px solid #339DC6;
}
.dafis-label{
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2V4eZgU8gLiiyJ3kG7IcEe7_dBqys4DwmUq_9ScY60DE6jKhhmcDpNPnu-MwiQN0bjjOPJErYZ_UgOuyd0-DuCO8fmtTvQR7zudX5exkKN-8hM1W4WZEWQE_FgL6rMuBEm1LFzl34BkY/s1600/bg4.gif) repeat-x scroll 0 0 #E1F4FB;
font-weight:bold;
line-height:1.4em;
overflow:hidden;
white-space:nowrap;
vertical-align: baseline;
margin: 1px 3px;
outline: none;
cursor: pointer;
text-decoration: none;
padding: 2px 10px;
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
border:1px solid #2F94BA;
}
.dafis-label:hover{
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6PdN7EnIBh_9Ol9mrJEsAOCR7QSXMQ8_xRr2kD9cILfehF_kDLPRqkrdtg3_jwBQQgi765uZNWYpcyrpyxTail7Gh8mQ6KOqJmCHIgQ3Osuxy4Xoq9ApQsOl1hiT_WmfPIECr7l9XEeU/s320/bg2.gif) repeat-x scroll 0 0 #E1F4FB;
color:#003366;
}
.dafis-daf ol{
margin:0 0 0 30px !important;
padding:0 !important;
}
.dafis-daf ol li{
background-color:#C9E9F4;
line-height:1.5em;
margin:1px 3px !important;
white-space:nowrap;
text-align:left;
border:1px solid #339DC6;
}
.dafis-daf ol li a{
text-decoration: none !important;
color:#333 !important;
display:block;
padding-left:10px;
}
.dafis-daf ol li a:hover{
background: #7BC4DF;
border-left: 5px #333 solid;
padding-left: 5px;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
5. Setelah itu Simpan template.6. Langkah selanjutnya adalah memasang daftar isi di blog, letakkan kode dibawah ini pada HTML/JavaScript atau posting blog Anda pada mode HTML.
<script type="text/javascript" src="http://id-pemula-javascript.googlecode.com/files/Dafsis.js"></script> <script src="http://id-pemula.blogspot.com/feeds/posts/summary?max-results=1000&alt=json-in-script&callback=loadtoc"></script>
Keterangan:Ganti kode yang berwarna merah diatas dengan alamat URL blog Anda.
Nah, sekarang blog Anda sudah terpasang daftar isi dengan efek Jquery yang menarik.
0 komentar:
Post a Comment