Cara mudah membuat slide show
Membuat blog lebih tampil menarik salah satunya dengan menampilkan slide show berupa gambar, cara ini cukup mudah dan cepat, Untuk lebih lengkapnya ikuti langkah berikut.
<script language="JavaScript1.2">
var variableslide=new Array()
//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]
variableslide[0]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHM6adUqAe5ux5N9BbnQ44TDz0-amtkg0cPzu6FBY_Lh88gl6UvoRkrS85c_eAirdhpPH3c5O-kAf2lNg-4NRD_StQanH4Ig2aEo9wU65hIx-7ZCIwnhks03OS7zsaG3AXAwa9mILDqcY/s128/header_u15.png', '', '']
variableslide[1]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAgh6i2m-JtChYO4hcj_1ouxl_GTCPubiRwIgjxpDtQSBr0chDw9wh0s6OrMz-mWe3hGSqReju6xs2t2S5fTh8scTPAdtDDnbAFtOv-lb2VOeO8fEOBp-x05VlsdrV59s_bIccsitIwg/s128/header_u18.png', '', '']
variableslide[2]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWNZp9pYrsVT86PN2_-W-bBwmRhp9PnNq98Uh4lqve_9UvJOO3ebt6LPttq6rShp7Ec16mlEU101FFn3rQzLTvAsV057X3AwKSJ6ongboq9v-svbjiGfRWJqnXD_3Vbw_fE-7HTfYP4a8/s128/header_u2.png', '', '']
variableslide[3]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDXG57u1qu-Kv9OLgky7fqZIisx6r1nmqhqXKmj9nm8ZP9O2nxrqJcyzKT3-tYL0jzBs_EfBNxk1XXpGsP0LtvPWbYX-iC4BUy2WkKJia76B4YuDLKyI6_-oZAfxkVVgxn0ZPV3ULE7s/s128/header_u3.png', '', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='300px' //set to width of LARGEST image in your slideshow
var slideheight='auto' //set to height of LARGEST iamge in your slideshow, plus any text description
var slidebgcolor='transparent'
//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}
var currentslide=0
function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]
if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}
if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
</script>
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgcolor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>
- Login ke akun Blogger kamu.
- Dari halaman dashboard
- Pilih tab Elemen Halaman ( Page Element ).
- Klik pada bagian Tambah Gadget dan pilih HTML/JavaScript.
- Copykan script berikut dan letakkan pada kotak Content ( dimana saja bisa ) yang tersedia :
<script language="JavaScript1.2">
var variableslide=new Array()
//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]
variableslide[0]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHM6adUqAe5ux5N9BbnQ44TDz0-amtkg0cPzu6FBY_Lh88gl6UvoRkrS85c_eAirdhpPH3c5O-kAf2lNg-4NRD_StQanH4Ig2aEo9wU65hIx-7ZCIwnhks03OS7zsaG3AXAwa9mILDqcY/s128/header_u15.png', '', '']
variableslide[1]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAgh6i2m-JtChYO4hcj_1ouxl_GTCPubiRwIgjxpDtQSBr0chDw9wh0s6OrMz-mWe3hGSqReju6xs2t2S5fTh8scTPAdtDDnbAFtOv-lb2VOeO8fEOBp-x05VlsdrV59s_bIccsitIwg/s128/header_u18.png', '', '']
variableslide[2]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWNZp9pYrsVT86PN2_-W-bBwmRhp9PnNq98Uh4lqve_9UvJOO3ebt6LPttq6rShp7Ec16mlEU101FFn3rQzLTvAsV057X3AwKSJ6ongboq9v-svbjiGfRWJqnXD_3Vbw_fE-7HTfYP4a8/s128/header_u2.png', '', '']
variableslide[3]=['https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDXG57u1qu-Kv9OLgky7fqZIisx6r1nmqhqXKmj9nm8ZP9O2nxrqJcyzKT3-tYL0jzBs_EfBNxk1XXpGsP0LtvPWbYX-iC4BUy2WkKJia76B4YuDLKyI6_-oZAfxkVVgxn0ZPV3ULE7s/s128/header_u3.png', '', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='300px' //set to width of LARGEST image in your slideshow
var slideheight='auto' //set to height of LARGEST iamge in your slideshow, plus any text description
var slidebgcolor='transparent'
//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}
var currentslide=0
function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]
if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}
if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
</script>
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgcolor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>
Keterangan :
- Warna Merah ; alamat URL image yang akan dipasang, silakan ganti dengan punya kamu sendiri.
- Warna Kuning ; lebar widget yang ada, sesuaikan dengan kebutuhan.
- Warna Aqua ; waktu perputaran tampilan image, silakan ganti sesuai kebutuhan tambah besar makin lambat.
Selamat mencoba...!
Sumber : http://dynamicdrive.com
nice posts
BalasHapusthanks you...!
BalasHapushave a nice day...!
makasih infonya mas, saya lagi nyari nih artikel tentang cara pasang slideshow makasih
BalasHapus<a href='http://yahyagan.blogspot.com/>Yahyagan Blog</a>
makasih nich infonya.
BalasHapuscuman sayang saya ga pakai blogsport
salam kenal ya...
maksih infonya, saya banyak belajar disini :)
BalasHapus@tasbih ctk.. makasih smoga bermanfaat...!
BalasHapussiip ...dicoba dulu..makasih infonya kang...
BalasHapusTHX BOS
BalasHapus