//本插件由www.swiper.com.cn提供 //版本1.03 function swiperanimatecache(a) { for (j = 0; j < a.slides.length; j++) for (allboxes = a.slides[j].queryselectorall(".ani"), i = 0; i < allboxes.length; i++) allboxes[i].attributes["style"] ? allboxes[i].setattribute("swiper-animate-style-cache", allboxes[i].attributes["style"].value) : allboxes[i].setattribute("swiper-animate-style-cache", " "), allboxes[i].style.visibility = "hidden" } function swiperanimate(a) { clearswiperanimate(a); var b = a.slides[a.activeindex].queryselectorall(".ani"); for (i = 0; i < b.length; i++) b[i].style.visibility = "visible", effect = b[i].attributes["swiper-animate-effect"] ? b[i].attributes["swiper-animate-effect"].value : "", b[i].classname = b[i].classname + " " + effect + " " + "animated", style = b[i].attributes["style"].value, duration = b[i].attributes["swiper-animate-duration"] ? b[i].attributes["swiper-animate-duration"].value : "", duration && (style = style + "animation-duration:" + duration + ";-webkit-animation-duration:" + duration + ";"), delay = b[i].attributes["swiper-animate-delay"] ? b[i].attributes["swiper-animate-delay"].value : "", delay && (style = style + "animation-delay:" + delay + ";-webkit-animation-delay:" + delay + ";"), b[i].setattribute("style", style) } function clearswiperanimate(a) { for (j = 0; j < a.slides.length; j++) for (allboxes = a.slides[j].queryselectorall(".ani"), i = 0; i < allboxes.length; i++) allboxes[i].attributes["swiper-animate-style-cache"] && allboxes[i].setattribute("style", allboxes[i].attributes["swiper-animate-style-cache"].value), allboxes[i].style.visibility = "hidden", allboxes[i].classname = allboxes[i].classname.replace("animated", " "), allboxes[i].attributes["swiper-animate-effect"] && (effect = allboxes[i].attributes["swiper-animate-effect"].value, allboxes[i].classname = allboxes[i].classname.replace(effect, " ")) }