//活动中心
$('.active').click(function (){
getActivePic_S();
getActivePic_B();
if($('div').hasClass('getPrize')){
$(".getPrize").remove();
}
$('#ca').show();
})
$(document).on("click","#change_sign",function(){
$('#ca').hide();
orgSdata();
setGetPrizeBtn();
})
//活动中心小图
function getActivePic_S(){
var Ajaxurl1 = "<?php echo site_url('bactive/getActivePic_S'); ?>";
$.ajax({
type: 'post',
url: Ajaxurl1,
data: '',
success: function (mag) {
//alert(mag);
$(".smimgBox").html(mag);
}
});
}
//活动中心大图
function getActivePic_B(){
var Ajaxurl2 = "<?php echo site_url('bactive/getActivePic_B'); ?>";
var userId = "<?php echo $userinfo['uid'];?>";
var sessId = "<?php echo $sessid;?>";
$.ajax({
type: 'post',
url: Ajaxurl2, //"id="+id+'&act_price='+act_price,
data:"userId="+userId+"&sessId="+sessId,
success: function (mag) {
//alert(mag);
$(".bigimgBox").html(mag);
}
});
}
======================
原生选取
$(document).on("click",".smimgBox li",function(){
var bigImg=$(".bigimgBox li");
zIndex=$(this).index();
$(this).addClass("smImgOn").siblings().removeClass("smImgOn");
bigImg.eq(zIndex).addClass("bigImgOn").siblings().removeClass("bigImgOn");
});