Javascript jQuery幻灯片显示缩略图数量问题
我有一个底部有缩略图的幻灯片。问题是有9张图片加载到滑块上,但只有3个缩略图,而幻灯片放映会浏览所有9张图片。附件是一个js代码。多谢各位Javascript jQuery幻灯片显示缩略图数量问题,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我有一个底部有缩略图的幻灯片。问题是有9张图片加载到滑块上,但只有3个缩略图,而幻灯片放映会浏览所有9张图片。附件是一个js代码。多谢各位 function comSlider603737() { var self = this; var g_HostRoot = ""; var g_TransitionTimeoutRef = null; var g_CycleTimeout = 5; var g_currFrame = 0; var
function comSlider603737() {
var self = this;
var g_HostRoot = "";
var g_TransitionTimeoutRef = null;
var g_CycleTimeout = 5;
var g_currFrame = 0;
var g_fontLoadJsRetries = 0;
var g_currDate = new Date(); var g_currTime = g_currDate.getTime(); var g_microID = g_currTime + '-' + Math.floor((Math.random()*1000)+1);
var g_InTransition = 0;var g_Navigation = 0;this.getCurrMicroID = function() { return g_microID; };
this.comSLoadImgInFrame = function(frameid, src)
{
jqCS603737("#comSImg603737_"+frameid+" img").attr("src", src).load(function(){
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth === 0)
{
//broken image
}
});
};
this.setNavStyle = function(id, background, color, border, type)
{
if (background === "")
{
jqCS603737("#comSNavigation603737_"+id).css("background", "none");
}
else if (background == "transparent")
{
jqCS603737("#comSNavigation603737_"+id).css("background", "transparent");
}
else
{
jqCS603737("#comSNavigation603737_"+id).css("background", "#"+background);
}
jqCS603737("#comSNavigation603737_"+id).css("color", "#"+color);
jqCS603737("#comSNavigation603737_"+id).css("border", border+"px solid #"+color);
var margin = (-1)*border;
jqCS603737("#comSNavigation603737_"+id).css("margin-top", margin+"px");
jqCS603737("#comSNavigation603737_"+id).css("margin-left", margin+"px");
if (type === 0)
{
jqCS603737("#comImgBullet603737_"+id).show();
jqCS603737("#comImgBulletcurr603737_"+id).hide();
}
else
{
jqCS603737("#comImgBulletcurr603737_"+id).show();
jqCS603737("#comImgBullet603737_"+id).hide();
}
};
this.targetClearTimeouts = function()
{
if (g_TransitionTimeoutRef != null) { window.clearTimeout(g_TransitionTimeoutRef); g_TransitionTimeoutRef = null;}
};
this.getNextFrame = function()
{
var ret = g_currFrame;
ret++;
if (ret == 9) {ret = 0;}
return ret;
};
this.getPrevFrame = function()
{
var ret = g_currFrame;
ret--;
if (ret < 0) {ret = (9-1);}
return ret;
};
this.stopAll = function()
{
jqCS603737("#comSFrame603737_0").stop(true, true);
jqCS603737("#comSFrameSek603737_0").stop(true, true);
jqCS603737("#comSFrame603737_1").stop(true, true);
jqCS603737("#comSFrameSek603737_1").stop(true, true);
jqCS603737("#comSFrame603737_2").stop(true, true);
jqCS603737("#comSFrameSek603737_2").stop(true, true);
jqCS603737("#comSFrame603737_3").stop(true, true);
jqCS603737("#comSFrameSek603737_3").stop(true, true);
jqCS603737("#comSFrame603737_4").stop(true, true);
jqCS603737("#comSFrameSek603737_4").stop(true, true);
jqCS603737("#comSFrame603737_5").stop(true, true);
jqCS603737("#comSFrameSek603737_5").stop(true, true);
jqCS603737("#comSFrame603737_6").stop(true, true);
jqCS603737("#comSFrameSek603737_6").stop(true, true);
jqCS603737("#comSFrame603737_7").stop(true, true);
jqCS603737("#comSFrameSek603737_7").stop(true, true);
jqCS603737("#comSFrame603737_8").stop(true, true);
jqCS603737("#comSFrameSek603737_8").stop(true, true);
};
this.switchFrame = function()
{
g_Navigation = 1;
var currFrame=g_currFrame;
g_currFrame = self.getNextFrame();
self.switchFromToFrame(currFrame, g_currFrame);
};
this.switchFramePrev = function()
{
g_Navigation = 0;
var currFrame=g_currFrame;
g_currFrame = self.getPrevFrame();
self.switchFromToFrame(currFrame, g_currFrame);
};
this.switchToFrame = function(toFrame)
{
if ((g_InTransition == 1) || (g_currFrame == toFrame))
{
if (g_currFrame == toFrame) { return false; }
self.stopAll();
}
var currFrame=g_currFrame;
g_currFrame=toFrame;
if (currFrame < g_currFrame)
g_Navigation = 0;
else
g_Navigation = 1;
self.switchFromToFrame(currFrame, g_currFrame);
};
this.switchFromToFrame = function(currFrame, toFrame)
{
if (g_InTransition == 1)
{
self.stopAll();
}
g_InTransition = 1;
self.startTransitionTimer();
jqCS603737("#comSFrameSek603737_"+currFrame+"").css("z-index", 1);
jqCS603737("#comSFrameSek603737_"+toFrame+"").css("z-index", 2);
jqCS603737("#comSFrameSek603737_"+toFrame+"").hide().fadeIn(1350, function() {
if (g_microID !=objcomSlider603737.getCurrMicroID()){return false;}jqCS603737("#comSFrame603737_"+currFrame).hide(); g_InTransition = 0;
} );
self.setNavStyle(currFrame, '','CCCCCC',0, 0); self.setNavStyle(toFrame, '','FFFFFF',0, 1); jqCS603737("#comSFrame603737_"+toFrame).show(1, function(){ });
};
this.startTransitionTimer = function()
{
self.targetClearTimeouts(); g_TransitionTimeoutRef = window.setTimeout(function() {objcomSlider603737.onTransitionTimeout(g_microID);}, g_CycleTimeout*1000);
};
this.onTransitionTimeout = function(microID)
{
if (g_microID != microID) { return false; }
self.switchFrame();
};
this.initFrame = function()
{
g_currFrame = 0;
self.startTransitionTimer();
jqCS603737("#comSFrameSek603737_"+g_currFrame+"").hide().fadeIn(1350);
jqCS603737("#comSFrame603737_"+g_currFrame).show(1, function(){if (g_microID !=objcomSlider603737.getCurrMicroID()){return false;}self.setNavStyle(g_currFrame, '','FFFFFF',0, 1); });
return true;
};
this.scriptLoaded = function()
{
jqCS603737 = jQuery603737.noConflict(false);jqCS603737("#comslider_in_point_603737").html('<div id="comSWrapper603737_" name="comSWrapper603737_" style="display: inline-block; text-align: center; border:0px; width:740px; height:558px; position: relative; top: 0px; left: 0px;"><div id="comSWrapper603737_" name="comSWrapper603737_" style="overflow:hidden;border:0px; width:740px; height:558px; "><div id="comSFrameWrapper603737_" name="comSFrameWrapper603737_" style="position: absolute; top: 0px; left: 0px;"><div id="comSFrame603737_0" name="comSFrame603737_0" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_0" name="comSFrameSek603737_0" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_0" name="comSImg603737_0" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div><div id="comSHtml603737__bk0" name="comSHtml603737__bk0" style="background: #000000; position:absolute; overflow:hidden; top:249px; left:0px; width:740px; height:0px;"></div><script type="text/javascript"> jqCS603737("#comSHtml603737__bk0").fadeTo(0,0.5);</script><div id="comSHtml603737_0" name="comSHtml603737_0" style="padding:10px; background: transparent; position:absolute; overflow:hidden; top:249px; left:0px; width:740px; height:0px;"></div></div></div><div id="comSFrame603737_1" name="comSFrame603737_1" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_1" name="comSFrameSek603737_1" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_1" name="comSImg603737_1" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_2" name="comSFrame603737_2" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_2" name="comSFrameSek603737_2" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_2" name="comSImg603737_2" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_3" name="comSFrame603737_3" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_3" name="comSFrameSek603737_3" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_3" name="comSImg603737_3" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_4" name="comSFrame603737_4" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_4" name="comSFrameSek603737_4" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_4" name="comSImg603737_4" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_5" name="comSFrame603737_5" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_5" name="comSFrameSek603737_5" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_5" name="comSImg603737_5" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_6" name="comSFrame603737_6" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_6" name="comSFrameSek603737_6" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_6" name="comSImg603737_6" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_7" name="comSFrame603737_7" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_7" name="comSFrameSek603737_7" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_7" name="comSImg603737_7" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div><div id="comSFrame603737_8" name="comSFrame603737_8" style="position:absolute; top:0px; left:0px; width:740px; height:498px;"><div id="comSFrameSek603737_8" name="comSFrameSek603737_8" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><div id="comSImg603737_8" name="comSImg603737_8" style="position:absolute; overflow:hidden; top:0px; left:0px; width:740px; height:498px;"><img style="border:0px; width:742px; height:498px;"></img></div></div></div></div><a name="0" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_0" name="comSNavigation603737_0" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:254px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_0" name="comImgBullet603737_0" src="comslider603737/imgnav/1504060925261521.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_0" name="comImgBulletcurr603737_0" src="comslider603737/imgnav/1504060925261521.png?timstamp=1428306527" /></div></div></a><a name="1" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_1" name="comSNavigation603737_1" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:333px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_1" name="comImgBullet603737_1" src="comslider603737/imgnav/1504060930388851.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_1" name="comImgBulletcurr603737_1" src="comslider603737/imgnav/1504060930388851.png?timstamp=1428306527" /></div></div></a><a name="2" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_2" name="comSNavigation603737_2" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_2" name="comImgBullet603737_2" src="comslider603737/imgnav/1504060936349581.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_2" name="comImgBulletcurr603737_2" src="comslider603737/imgnav/1504060936349581.png?timstamp=1428306527" /></div></div></a><a name="3" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_3" name="comSNavigation603737_3" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_3" name="comImgBullet603737_3" src="comslider603737/imgnav/B4.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_3" name="comImgBulletcurr603737_3" src="comslider603737/imgnav/B4.png?timstamp=1428306527" /></div></div></a><a name="4" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_4" name="comSNavigation603737_4" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_4" name="comImgBullet603737_4" src="comslider603737/imgnav/B5.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_4" name="comImgBulletcurr603737_4" src="comslider603737/imgnav/B5.png?timstamp=1428306527" /></div></div></a><a name="5" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_5" name="comSNavigation603737_5" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_5" name="comImgBullet603737_5" src="comslider603737/imgnav/B6.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_5" name="comImgBulletcurr603737_5" src="comslider603737/imgnav/B6.png?timstamp=1428306527" /></div></div></a><a name="6" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_6" name="comSNavigation603737_6" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_6" name="comImgBullet603737_6" src="comslider603737/imgnav/B7.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_6" name="comImgBulletcurr603737_6" src="comslider603737/imgnav/B7.png?timstamp=1428306527" /></div></div></a><a name="7" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_7" name="comSNavigation603737_7" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_7" name="comImgBullet603737_7" src="comslider603737/imgnav/B8.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_7" name="comImgBulletcurr603737_7" src="comslider603737/imgnav/B8.png?timstamp=1428306527" /></div></div></a><a name="8" style="cursor:pointer; text-decoration:none !important; font-size:40px;" href=""><div id="comSNavigation603737_8" name="comSNavigation603737_8" style="margin-left:0px; margin-top:0px; border: 0px solid #CCCCCC; position:absolute; height:50px; width:74px; top:503px; left:412px; z-index: 5; text-align: center; vertical-align:bottom; color: #CCCCCC;background: #; "><div id="height_workaround" style="font-size:1px;line-height:0;height:50px;"> <img style="position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBullet603737_8" name="comImgBullet603737_8" src="comslider603737/imgnav/B9.png?timstamp=1428306527" /><img style="display: none; position: absolute; position: absolute; top: 0px; left: 0px; border:0px;" id="comImgBulletcurr603737_8" name="comImgBulletcurr603737_8" src="comslider603737/imgnav/B9.png?timstamp=1428306527" /></div></div></a></div><div id="comSNavigationControl603737__back" name="comSNavigationControl603737__back" style=" cursor: pointer; margin: 0px; margin-left:5px; border: 0px; position:absolute; height:32px; width:32px; top:233px; left:0px; z-index: 6; text-align: center; vertical-align:bottom; background-color: transparent; "><img class="def" style="position: absolute; top: 0px; left: 0px; border: 0px;" src="comslider603737/imgnavctl/defback.png?1428306431" /><img class="hover" style="position: absolute; top: 0px; left: 0px; display:none; border: 0px;" src="comslider603737/imgnavctl/defbackhover.png?1428306431" /></div><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__back").bind(\'mouseenter\', function() { jqCS603737(this).css(\'background-color\', \'transparent\'); jqCS603737("#comSNavigationControl603737__back img.hover").show(); jqCS603737("#comSNavigationControl603737__back img.def").hide(); });</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__back").bind(\'mouseleave\', function() { jqCS603737(this).css(\'background-color\', \'transparent\'); jqCS603737("#comSNavigationControl603737__back img.def").show(); jqCS603737("#comSNavigationControl603737__back img.hover").hide(); });</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__back").bind(\'click\', function() { objcomSlider603737.switchFramePrev(); });</script><div id="comSNavigationControl603737__forward" name="comSNavigationControl603737__forward" style=" cursor: pointer; margin: 0px; margin-left:-5px; border: 0px; position:absolute; height:32px; width:32px; top:233px; left:708px; z-index: 6; text-align: center; vertical-align:bottom; background-color: transparent; "><img class="def" style="position: absolute; top: 0px; left: 0px; border: 0px;" src="comslider603737/imgnavctl/defforward.png?1428306431" /><img class="hover" style="position: absolute; top: 0px; left: 0px; display:none; border: 0px;" src="comslider603737/imgnavctl/defforwardhover.png?1428306431" /></div><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__forward").bind(\'mouseenter\', function() { jqCS603737(this).css(\'background-color\', \'transparent\'); jqCS603737("#comSNavigationControl603737__forward img.hover").show(); jqCS603737("#comSNavigationControl603737__forward img.def").hide(); });</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__forward").bind(\'mouseleave\', function() { jqCS603737(this).css(\'background-color\', \'transparent\'); jqCS603737("#comSNavigationControl603737__forward img.def").show(); jqCS603737("#comSNavigationControl603737__forward img.hover").hide(); });</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__forward").bind(\'click\', function() { objcomSlider603737.switchFrame(); });</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__back").fadeTo(0,0.8);</script><script type="text/javascript"> jqCS603737("#comSNavigationControl603737__forward").fadeTo(0,0.8);</script></div>');
jqCS603737("#comslider_in_point_603737 a").bind('click', function() { if ((this.name.length > 0) && (isNaN(this.name) === false)) { self.switchToFrame(parseInt(this.name)); return false;} });
self.comSLoadImgInFrame("0", "comslider603737/img/1504060925261521.png?1428306431");jqCS603737("#comSFrame603737_0").hide();
self.comSLoadImgInFrame("1", "comslider603737/img/1504060930388851.png?1428306431");jqCS603737("#comSFrame603737_1").hide();
self.comSLoadImgInFrame("2", "comslider603737/img/1504060936349581.png?1428306431");jqCS603737("#comSFrame603737_2").hide();
self.comSLoadImgInFrame("3", "comslider603737/img/B4.png?1428306431");jqCS603737("#comSFrame603737_3").hide();
self.comSLoadImgInFrame("4", "comslider603737/img/B5.png?1428306431");jqCS603737("#comSFrame603737_4").hide();
self.comSLoadImgInFrame("5", "comslider603737/img/B6.png?1428306431");jqCS603737("#comSFrame603737_5").hide();
self.comSLoadImgInFrame("6", "comslider603737/img/B7.png?1428306431");jqCS603737("#comSFrame603737_6").hide();
self.comSLoadImgInFrame("7", "comslider603737/img/B8.png? 1428306431");jqCS603737("#comSFrame603737_7").hide();
self.comSLoadImgInFrame("8", "comslider603737/img/B9.png? 1428306431");jqCS603737("#comSFrame603737_8").hide();
jqCS603737("#comSFrame603737_8").hide();
jqCS603737("#comSFrame603737_8").hide();
self.initFrame();
};
var g_CSIncludes = new Array();
var g_CSLoading = false;
var g_CSCurrIdx = 0;
this.include = function(src, last)
{
if (src !== '')
{
var tmpInclude = Array();
tmpInclude[0] = src;
tmpInclude[1] = last;
//
g_CSIncludes[g_CSIncludes.length] = tmpInclude;
}
if ((g_CSLoading === false) && (g_CSCurrIdx < g_CSIncludes.length))
{
var oScript = null;
if (g_CSIncludes[g_CSCurrIdx][0].split('.').pop() == 'css')
{
oScript = document.createElement('link');
oScript.href = g_CSIncludes[g_CSCurrIdx][0];
oScript.type = 'text/css';
oScript.rel = 'stylesheet';
oScript.onloadDone = true;
g_CSLoading = false;
g_CSCurrIdx++;
if (g_CSIncludes[g_CSCurrIdx-1][1] === true)
self.scriptLoaded();
else
self.include('', false);
}
else
{
oScript = document.createElement('script');
oScript.src = g_CSIncludes[g_CSCurrIdx][0];
oScript.type = 'text/javascript';
//oScript.onload = scriptLoaded;
oScript.onload = function()
{
if ( ! oScript.onloadDone )
{
oScript.onloadDone = true;
g_CSLoading = false;
g_CSCurrIdx++;
if (g_CSIncludes[g_CSCurrIdx-1][1] === true)
self.scriptLoaded();
else
self.include('', false);
}
};
oScript.onreadystatechange = function()
{
if ( ( "loaded" === oScript.readyState || "complete" === oScript.readyState ) && ! oScript.onloadDone )
{
oScript.onloadDone = true;
g_CSLoading = false;
g_CSCurrIdx++;
if (g_CSIncludes[g_CSCurrIdx-1][1] === true)
self.scriptLoaded();
else
self.include('', false);
}
};
}
//
document.getElementsByTagName("head").item(0).appendChild(oScript);
//
g_CSLoading = true;
}
};
}
objcomSlider603737 = new comSlider603737();
objcomSlider603737.include('comslider603737/js/helpers.js', false);
objcomSlider603737.include('comslider603737/js/jquery-1.10.1.js', false);
objcomSlider603737.include('comslider603737/js/jquery-ui-1.10.3.effects.js', true);
函数comSlider603737(){
var self=这个;
var g_HostRoot=“”;
var g_TransitionTimeoutRef=null;
var g_CycleTimeout=5;
var g_currFrame=0;
var g_fontLoadJsRetries=0;
var g_currDate=new Date();var g_currTime=g_currDate.getTime();var g_microID=g_currTime+'-'+Math.floor((Math.random()*1000)+1);
var g_InTransition=0;var g_Navigation=0;this.getCurrMicroID=function(){return g_microID;};
this.comSLoadImgInFrame=函数(frameid,src)
{
jqCS603737(“#comSImg603737”+frameid+“img”).attr(“src”,src).load(function(){
如果(!this.complete | | typeof this.naturalWidth==“未定义”| | this.naturalWidth==0)
{
//残影
}
});
};
this.setNavStyle=函数(id、背景、颜色、边框、类型)
{
如果(背景==“”)
{
jqCS603737(“comSNavigation603737”+id).css(“背景”、“无”);
}
else if(背景==“透明”)
{
jqCS603737(“comSNavigation603737”+id).css(“背景”、“透明”);
}
其他的
{
jqCS603737(“comSNavigation603737”+id).css(“背景”、“#”+background);
}
jqCS603737(“#comSNavigation603737"+id).css(“颜色”,“#”+color”);
jqCS603737(“comSNavigation603737”+id).css(“border”,border+“px solid”+color);
var保证金=(-1)*边界;
jqCS603737(“#comSNavigation603737"+id).css(“页边距顶部”,页边距+“px”);
jqCS603737(“#comSNavigation603737"+id).css(“左边距”,右边距+“px”);
如果(类型==0)
{
jqCS603737(“comImgBullet603737”+id).show();
jqCS603737(“#comImgBulletcurr603737#”+id).hide();
}
其他的
{
jqCS603737(“#comImgBulletcurr603737"+id).show();
jqCS603737(“#comImgBullet603737”+id).hide();
}
};
this.targetClearTimeouts=函数()
{
如果(g_TransitionTimeoutRef!=null){window.clearTimeout(g_TransitionTimeoutRef);g_TransitionTimeoutRef=null;}
};
this.getNextFrame=函数()
{
var ret=g_currFrame;
ret++;
如果(ret==9){ret=0;}
返回ret;
};
this.getPrevFrame=函数()
{
var ret=g_currFrame;
ret--;
如果(ret<0){ret=(9-1);}
返回ret;
};
this.stopAll=函数()
{
jqCS603737(“通信框架603737_0”)。停止(真,真);
jqCS603737(“comSFrameSek603737_0”)。停止(真,真);
jqCS603737(“通信框架603737_1”)。停止(真,真);
jqCS603737(“comSFrameSek603737_1”)。停止(真,真);
jqCS603737(“comSFrame603737_2”)。停止(真,真);
jqCS603737(“comSFrameSek603737_2”)。停止(真,真);
jqCS603737(“通信框架603737_3”)。停止(真,真);
jqCS603737(“comSFrameSek603737_3”)。停止(真,真);
jqCS603737(“通信框架603737_4”)。停止(真,真);
jqCS603737(“comSFrameSek603737_4”)。停止(真,真);
jqCS603737(“comSFrame603737_5”)。停止(true,true);
jqCS603737(“comSFrameSek603737_5”)。停止(真,真);
jqCS603737(“通信框架603737_6”)。停止(真,真);
jqCS603737(“comSFrameSek603737_6”)。停止(真,真);
jqCS603737(“通信框架603737”)。停止(真,真);
jqCS603737(“comSFrameSek603737_7”)。停止(真,真);
jqCS603737(“通信框架603737_8”)。停止(真,真);
jqCS603737(“comSFrameSek603737_8”)。停止(真,真);
};
this.switchFrame=函数()
{
g_导航=1;
var currFrame=g_currFrame;
g_currFrame=self.getNextFrame();
自切换至帧(当前帧、当前帧);
};
this.switchFramePrev=函数()
{
g_导航=0;
var currFrame=g_currFrame;
g_currFrame=self.getPrevFrame();
自切换至帧(当前帧、当前帧);
};
this.switchToFrame=函数(toFrame)
{
if((g_内部转换==1)| |(g_当前帧==toFrame))
{
如果(g_currFrame==toFrame){返回false;}
self.stopAll();
}
var currFrame=g_currFrame;
g_currFrame=toFrame;
如果(当前帧<当前帧)
g_导航=0;
其他的
g_导航=1;
自切换至帧(当前帧、当前帧);
};
this.switchFromToFrame=函数(currFrame,toFrame)
{
if(g_内置==1)
{
self.stopAll();
}
g_内置=1;
self.startTransitionTimer();
jqCS603737(“#comSFrameSek603737”+currFrame+”).css(“z-index”,1);
jqCS603737(“comSFrameSek603737”+toFrame+).css(“z-index”,2);
jqCS603737(“#comSFrameSek603737#”+toFrame+”).hide().fadeIn(1350,function(){
如果(g#u microID!=objcomSlider603737.getCurrMicroID()){return false;}jqCS603737(“#comSFrame603737#+currFrame).hide();g#u InTransition=0;
} );
self.setNavStyle(currFrame,,'CCCCCC',0,0);self.setNavStyle(toFrame,,'FFFFFF',0,1);jqCS603737(“#comSFrame603737_907;+toFrame).show(1,function(){});
};
this.startTransitionTimer=函数()
{
self.targetClearTimeouts();g_TransitionTimeoutRef=window.setTimeout(函数(){objcomSlider603737.ontransionTimeout(g_microID);},g_CycleTimeout*1000);
};
this.onTransitionTimeout=函数(microID)
{
如果(g_microID!=microID){返回false;}
self.switchFrame();
};
this.initFrame=函数()
{
g_currFrame=0;
self.startTransitionTimer();
jqCS603737(“#comSFrameSek603737_35;”+g_currFrame+”).hide().fadeIn(1350);
jqCS603737(“#comSFrame603737#+g#u currFrame”).show(1,函数(){if(g#u microID!=objcomSlider603737.getCurrMicroID()){return false;}self.setNavStyle(g#currFrame,,'FFFFFF',0,1);});
返回true;
};
this.scriptLoaded=函数()
{
jqCS603737=jQuery603737.noConflict(false);jqCS603737(“comslider”位于U点603737”).html('jqCS603737(“comSNavigationControl603737_uback”).bind('mouseenter',function(){JSQC603737(this).css('background-color\,'transparent\);jqCS603737(“comSNavigationControl603737”)back img.hover.show(“#comSNavigationControl603737_uback img.def”).hide();});jqCS603737(“#com