javascript 响应横幅旋转器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 响应横幅旋转器相关的知识,希望对你有一定的参考价值。
/* JS -- Responsive Banner Rotator -- */
(function($){
var jQuery = $;
function sliderHeight(e) {
var sh = (e != null && e.target != null && e.target.nodeName === 'IMG' ?
$(e.target) :
$('.item img:visible')
).height();
$('.slider').css({'height': sh +'px'});
$('.slider .scrollable').css({'height': sh +'px'});
}
$(document).ready(function() {
$(".item img").eq(0).one("load", sliderHeight).each(function() {
if(this.complete) $(this).load();
});
});
$(window).on('resize', sliderHeight);
})(jQ171);
以上是关于javascript 响应横幅旋转器的主要内容,如果未能解决你的问题,请参考以下文章