[quote=y4sir]
[b]all[/b]
ada yg tw kode photo gallary random gak ?
n
photo primary jadi slide show ???
klo yg tw code na plis ksh tw gw[/quote]
brow, maksud na poto galery jadi random gmana ???
klo poto galery jadi slide , nich kode na
[quote]//Moving Photo Gallery
if ( ! attachOnLoadHandler(function () { movingPhotos();}))
window.onload = function () { movingPhotos();};
function movingPhotos() {
var marqueePhotos = document.getElementById("content_1").innerHTML;
document.getElementById("content_1").innerHTML ="<marquee direction='left' height='100%' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+
marqueePhotos+"</marquee>";
}[/quote]
klo poto primary na jadi slide show nich kode na brow
[quote]//CUSTOMIZED MAIN PHOTO
if (!attachOnLoadHandler(function() { randImage();})) window.onload = function() { randImage();};
function randImage() {
RANDOMIMG.init();
}
if (typeof RANDOMIMG == "undefined") { RANDOMIMG = {}; }
RANDOMIMG = {
image: [],
sibling: [],
randimage: [],
init: function() {
var preload = [];
for (var n=0;n<this.randimage.length;n++) {
preload[n] = [];
preload[n].setAttribute("src",""+this.randimage[n]+"");
}
this.randimage[0] = "[b]URL gmbar[/b]";
this.randimage[1] = "[b]URL gmbar[/b]";
this.randimage[2] = "[b]URL gmbar[/b]";
this.randimage[3] = "[b]URL gmbar[/b]";
this.randimage[4] = "[b]URL gmbar[/b]";
this.randimage[5] = "[b]URL gmbar[/b]";
this.image = document.createElement("DIV");
this.image.setAttribute("class","randImg");
this.image.innerHTML = "<img name=\"defaultimage\" width=\"200\" height=\"250\" src=\""+this.randimage[Math.floor(Math.random()*(this.randimage.length))]+"\">";
this.sibling = this.getModuleByClassName(/imgblock200/i)[0];
this.sibling.parentNode.replaceChild(this.image,this.sibling);
setInterval("RANDOMIMG.rotateimage()", 2*1000);
},
rotateimage: function() {
var ind = 0;
if (ind == (temp = Math.floor(Math.random()*(this.randimage.length)))) {
ind = (ind == 0) ? 1 : ind - 1;
}else {
ind = temp;
}
document.images.defaultimage.setAttribute("src",""+this.randimage[ind]+"");
},
getModuleByClassName: function(sClass) {
var elm = [];
var els = document.getElementsByTagName("*") || document.all;
for (var j=0,k=els.length;j<k;j++) {
if (new RegExp(sClass).test(els[j].className))elm.push(els[j]);
}
return elm;
}
};[/quote]
smoga bermanfaat
hehehe
@ raykyo
sbar aja brow ...
ntar juga linker na dpat lagi ...
mnding k opp topic aja ngobrol ....
Last edited by cyber_man (2008-03-05 02:31:28)