澳门十大电子游戏新手怎么玩
";
for(var i=0; i < lenc121770; i++) {
btnc121770 += "";
}
btnc121770 += "
";
$("#focusc121770").append(btnc121770);
$("#focusc121770 .btnBgc121770").css("opacity",0.5);
//为小按钮添加鼠标滑入事件,以显示相应的内容
$("#focusc121770 .btnc121770 span").css("opacity",0.4).mouseenter(function() {
indexc121770 = $("#focusc121770 .btnc121770 span").index(this);
showPics(indexc121770);
}).eq(0).trigger("mouseenter");
//上一页、下一页按钮透明度处理
$("#focusc121770 .preNextc121770").css("opacity",0.2).hover(function() {
$(this).stop(true,false).animate({"opacity":"0.5"},300);
},function() {
$(this).stop(true,false).animate({"opacity":"0.2"},300);
});
//上一页按钮
$("#focusc121770 .prec121770").click(function() {
indexc121770 -= 1;
if(indexc121770 == -1) {indexc121770 = lenc121770 - 1;}
showPics(indexc121770);
});
//下一页按钮
$("#focusc121770 .nextc121770").click(function() {
indexc121770 += 1;
if(indexc121770 == lenc121770) {indexc121770 = 0;}
showPics(indexc121770);
});
//本例为左右滚动,即所有li元素都是在同一排向左浮动,所以这里需要计算出外围ul元素的宽度
$("#focusc121770 ul").css("width",sWidthc121770 * (lenc121770));
//鼠标滑上焦点图时停止自动播放,滑出时开始自动播放
$("#focusc121770").hover(function() {
clearInterval(picTimerc121770);
},function() {
picTimerc121770 = setInterval(function() {
showPics(indexc121770);
indexc121770++;
if(indexc121770 == lenc121770) {indexc121770 = 0;}
},4000); //此4000代表自动播放的间隔,单位:毫秒
}).trigger("mouseleave");
//显示图片函数,根据接收的index值显示相应的内容
function showPics(indexc121770) { //普通切换
var nowLeftc121770 = -indexc121770*sWidthc121770; //根据index值计算ul元素的left值
$("#focusc121770 ul").stop(true,false).animate({"left":nowLeftc121770},300); //通过animate()调整ul元素滚动到计算出的position
$("#focusc121770 .btnc121770 span").stop(true,false).animate({"opacity":"0.4"},300).eq(indexc121770).stop(true,false).animate({"opacity":"1"},300); //为当前的按钮切换到选中的效果
}
});
正文、栏目列表与相关阅读构成完整路径,适合按主题持续查阅。