筆記一下( 5月lovelybox html )

var add = document.getElementById("big1");
var image = new Image();
image.onload=function(){
add.appendChild(image);
$(add).animate({opacity:0.5},0).animate({opacity:1},250);
}
var imgurlary = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"];
function dfun() {
for(var i = 0;i < 20;i++) {
(function(i) {
$("#small" + String(i + 1)).mouseover(function() {
image.src="stylesheets/images/products_"+imgurlary[i]+".png";
}).mouseout(function(){add.removeChild(image)})
}
)(i)
}
}
dfun();

創作者介紹
創作者 陳阿全 的頭像
陳阿全

12:12

陳阿全 發表在 痞客邦 留言(0) 人氣()