divappends += "
";}
if (divappends != "") {
document.getElementById("displaypicture").style.display = "block";
}
document.getElementById("rollList").innerHTML = divappends;
}
scall();
}
function scall(){
$("#displaypicture").css("top",document.documentElement.scrollTop+100);
}
window.οnscrοll=scall;
//关闭图片预览DIV
function closeshow() {
document.getElementById("displaypicture").style.display = "none";
}
//图片显示效果JS开始
var $id = function (id) {
return document.getElementById(id);
};
var scrollHori = {locked:0, vector:0, start:function (thiso) {
if (scrollHori.locked == 0) {
if (thiso.id == "rollLeft" && $id("rollBox").scrollLeft != 0) {
scrollHori.vector = -20;
scrollHori.scroll();
}
if (thiso.id == "rollRight" && $id("rollBox").scrollLeft != ($id("rollList").offsetWidth - $id("rollBox").offsetWidth)) {
scrollHori.vector =20;
scrollHori.scroll();
}
}
}, scroll:function () {
var step = 0;
var size = $id("rollList").offsetWidth / $id("rollList").getElementsByTagName("li").length;
play = setInterval(function () {
if (size > step) {
$id("rollBox").scrollLeft += scrollHori.vector;
step += Math.abs(scrollHori.vector);
scrollHori.locked = 1;
} else {
scrollHori.stop();
}
}, 20);
}, stop:function () {
if (window.play) {
clearInterval(window.play);
scrollHori.locked = 0;
}
}};
//图片显示效果JS结束