太阳成游戏网站
{template "header.html"}
{php $mysite=dr_site_value('hdtp');}
{loop $mysite $tt}
{/loop}
您的位置:
主页
> {dr_catpos($catid, '', true, '
[name]
> ')}
产品中心
{php $mycat=dr_share_cat_value(5, 'name');}
{category module=share pid=5 return=t}
{$t.name}
{/category}
推荐产品
{module module=image catid=5 num=4}
{$t['title']}
{/module}
联系我们
{SITE_NAME}
河 南:{php $mysite=dr_site_value('dianhua');}{$mysite}
全 国:{php $mysite=dr_site_value('dianhua');}{$mysite}
电 话:{php $mysite=dr_site_value('shouji');}{$mysite}
地 址:{php $mysite=dr_site_value('dizhi');}{$mysite}
{$title}
发布时间:{$inputtime}
{loop $t['imgurls'] $i $c}
{/loop}
{loop $t['imgurls'] $i $c}
{/loop}
//缩略图滚动事件
$(".jCarouselLite").jCarouselLite({
btnNext: "#btnNext",
btnPrev: "#btnPrev",
scroll: 1,
speed: 240,
circular: false,
visible: 5
});
var currentImage;
var currentIndex = -1;
//显示大图(参数index从0开始计数)
function showImage(index){
//更新当前图片页码
$(".CounterCurrent").html(index + 1);
//隐藏或显示向左向右鼠标手势
var len = $('#OriginalPic img').length;
if(index == len - 1){
$("#aNext").hide();
}else{
$("#aNext").show();
}
if(index == 0){
$("#aPrev").hide();
}else{
$("#aPrev").show();
}
//显示大图
if(index < $('#OriginalPic img').length){
var indexImage = $('#OriginalPic p')[index];
//隐藏当前的图
if(currentImage){
if(currentImage != indexImage){
$(currentImage).css('z-index', 2);
$(currentImage).fadeOut(0,function(){
$(this).css({'display':'none','z-index':1})
});
}
}
//显示用户选择的图
$(indexImage).show().css({'opacity': 0.4});
$(indexImage).animate({opacity:1},{duration:200});
//更新变量
currentImage = indexImage;
currentIndex = index;
//移除并添加高亮
$('#ThumbPic img').removeClass('active');
$($('#ThumbPic img')[index]).addClass('active');
//设置向左向右鼠标手势区域的高度
//var tempHeight = $($('#OriginalPic img')[index]).height();
//$('#aPrev').height(tempHeight);
//$('#aNext').height(tempHeight);
}
}
//下一张
function ShowNext(){
var len = $('#OriginalPic img').length;
var next = currentIndex < (len - 1) ? currentIndex + 1 : 0;
showImage(next);
}
//上一张
function ShowPrep(){
var len = $('#OriginalPic img').length;
var next = currentIndex == 0 ? (len - 1) : currentIndex - 1;
showImage(next);
}
//下一张事件
$("#aNext").click(function(){
ShowNext();
if($(".active").position().left >= 144 * 5){
$("#btnNext").click();
}
});
//上一张事件
$("#aPrev").click(function(){
ShowPrep();
if($(".active").position().left <= 144 * 5){
$("#btnPrev").click();
}
});
//初始化事件
$(".OriginalPicBorder").ready(function(){
ShowNext();
//绑定缩略图点击事件
$('#ThumbPic li').bind('click',function(e){
var count = $(this).attr('rel');
showImage(parseInt(count) - 0);
});
});
分享到:
上一篇:{if $prev_page}
{$prev_page.title}
{else}没有了{/if}
下一篇:{if $next_page}
{$next_page.title}
{else}没有了{/if}
{template "footer.html"}