标签:rev func img wip 加载 react nta 箭头 active
取消懒加载
if ($(‘#gallery‘).length != 0) {
$(‘#gallery img‘).removeClass(‘lazyload‘).attr(‘src‘,$(‘#gallery img‘).attr(‘data-src‘));
}
if ($(‘#s7thumbs‘).length != 0) {
$(‘#s7thumbs img‘).removeClass(‘lazyload‘).attr(‘src‘,$(‘#s7thumbs img‘).attr(‘data-src‘));
}
//轮播箭头垂直居中
function reactive_gallary_arrow_top($swiper) {
var outerHeight = $($swiper).find(".swiper-wrapper").height();
var imgHeight = $($swiper).find(".swiper-slide").find("img").height();
var percentage = 0.5*imgHeight/outerHeight * 100;
var prevArrow = $($swiper).find(".prev");
var nextArrow = $($swiper).find(".next");
prevArrow.css({
"top": percentage + ‘%‘
});
nextArrow.css({
"top": percentage + ‘%‘
});
}
//swiper调用
on: {
imagesReady:function () {
reactive_gallary_arrow_top(‘#p01-s5‘);
},
resize:function () {
reactive_gallary_arrow_top(‘#p01-s5‘);
}
}
标签:rev func img wip 加载 react nta 箭头 active
原文地址:https://www.cnblogs.com/gduf/p/11679349.html