87,910
社区成员
发帖
与我相关
我的任务
分享
$("#idGlideView img").each(function(){
$(this).css('opacity', '0.5');
}).hover(function(){
$(this).animate({opacity:1.0});
}, function(){
$(this).animate({opacity:0.5});
});
//oList.className = i == index ?'focus':'';////////////////增加这句就行,给容器增加focus样式的
//=====>注意需要导入jquery框架
i == index ? $('img', oList).animate({ opacity: 1.0 }) : $('img', oList).animate({ opacity: 0.5 });
/*#idGlideView div img{filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.7;}*/
#idGlideView div img{filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5;}
#idGlideView div.focus img{filter:alpha(opacity=100); -moz-opacity:1; -khtml-opacity: 1; opacity: 1;}
//相关设置
Set: function (index) {
if (index < 0) {
//鼠标移出容器返回默认状态
this.Each(function (oList, oText, i) {
oList._target = this._width * i;
if (oText) { oText._target = this._height_text; }
})
} else {
//鼠标移到某个滑动对象上
this.Each(function (oList, oText, i) {
oList.className = i == index ?'focus':'';////////////////增加这句就行,给容器增加focus样式的
oList._target = (i <= index) ? this._width_min * i : this._width_min * (i - 1) + this._width_max;
if (oText) { oText._target = (i == index) ? 0 : this._height_text; }
})
}
this.Move();
}