生成静态页吃代码了。
原始js:
<SCRIPT type=text/javascript>
var t = n = 0, count=4;
if($("#play_list").height()>=400)
//$("#play").height(425);//$("#play_list").height());
$("#play").css("overflow","hidden");
$("#play_list").height(422);
$("#play_list").css("overflow","hidden");
count= $("#play_list a").size()
$("#play_list a:not(:first-child)").hide();
$("#play_text li").eq(0).css({"background":"#7f0019","color":"#fff","font-weight":"bolder"})
$("#play_text li").mouseover(function() {
var i = $(this).text() - 1;
n = i;
if (i >= count) return;
$("#play_list a").filter(":visible").fadeOut(200,function(){$(this).parent().children().eq(i).fadeIn(300);});
$(this).css({"background":"#7f0019","color":"#fff","font-weight":"bolder"}).siblings().css({"background":"#fff","color":"#7f0019","font-weight":"normal"});
});
t = setInterval("showAuto()", 5000);
$("#play,#play_text").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 10000);});
function showAuto()
{
n = n >= (count - 1) ? 0 : ++n;
$("#play_text li").eq(n).trigger('mouseover');
}
</SCRIPT>
发布后代码:
<SCRIPT type=text/javascript>
var t = n = 0, count=4;
if($("#play_list").height()>=400)
//$("#play").height(425);//$("#play_list").height());
$("#play").css("overflow","hidden");
$("#play_list").height(422);
$("#play_list").css("overflow","hidden");
count= $("#play_list a").size()
$("#play_list a:not(:first-child)").hide();
$("#play_text li").eq(0).css({"background":"#7f0019","color":"#fff","font-weight":"bolder"})
$("#play_text li").mouseover(function() {
var i = $(this).text() - 1;
n = i;
if (i >= count) return;
$("#play_list a").filter(":visible").fadeOut(200,function());
$(this).css({"background":"#7f0019","color":"#fff","font-weight":"bolder"}).siblings().css({"background":"#fff","color":"#7f0019","font-weight":"normal"});
});
t = setInterval("showAuto()", 5000);
$("#play,#play_text").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 10000);});
function showAuto()
{
n = n >= (count - 1) ? 0 : ++n;
$("#play_text li").eq(n).trigger('mouseover');
}
</SCRIPT>