滑块只改变了 src 的路径,而不是链接,我哪里错了?
var imagenesSlider = $(".invisible > a");
var currentImg = 1;
setInterval(function() {
console.log(imagenesSlider[currentImg])
console.log(currentImg)
$("#slider a").attr("href", $(imagenesSlider[currentImg]).find("a").attr("href"));
$("#slider img").attr("src", $(imagenesSlider[currentImg]).find("img").attr("src"));
currentImg++;
if (currentImg == imagenesSlider.length) {
currentImg = 0;
}
}, 6000)
largeQ
相关分类