ntrol(arg) { var oBigController = arg; var currentItem = oBigController.getCurrentID(); activateThumb(currentItem); if (currentItem == 0) { $("#imgLeftBig").css({opacity: 0.4}); } else { $("#imgLeftBig").css({opacity: 1}); } //console.debug("currentItem "+currentItem) if (thumbs != undefined) { thumbs.goto(parseInt(currentItem)); } // alert(currentItem); } function thumbSlideControl(arg) { var oController = arg; var currentItem = oController.getCurrentID(); if (currentItem == 0) { $("#imgLeftThumb").css({opacity: 0.4}); } else { $("#imgLeftThumb").css({opacity: 1}) } } // autoSlide:2000, var oBigController = $("#carouselBig").msCarousel({ width: 728, height: 548, callback: bigSlideControl, showMessage: true, messageOpacity: 1 }).data("msCarousel"); var thumbs = $("#carouselThumb").msCarousel({ boxClass: 'li', // width: 532, width: 736, height: 124, callback: thumbSlideControl, scrollSpeed: 500 }).data("msCarousel"); //big button click $("#imgRightBig").click(function () { oBigController.next(); }); $("#imgLeftBig").click(function () { oBigController.previous(); }); //thumb click $("#imgRightThumb").click(function () { thumbs.next(); }); $("#imgLeftThumb").click(function () { thumbs.previous(); }) //add click event $("#carouselThumb li").click(function (arg) { var target = this; var counter = $("#carouselThumb li").index(target); oBigController.goto(parseInt(counter)); }) //no use $("#ver").html("v" + oBigController.getVersion()); /** * 发布评论 */ function addComment(objId) { if(checkLogin()){ var content = $.trim($("#addcontent").val()); if (!content) { tipsOp('留言不得为空', 'error'); return false; } if (content.length > 100) { tipsOp('留言不得超过100字', 'error'); return false; } if (intUserStatus == 2) { tipsOp('您的账号被禁用,无法进行此操作!', 'fail'); return false; } $.post('index.php?action=modelcomment', {objId: objId, content: content, ac: 'add'}, function (data) { if (data === '你操作的太频繁了,请稍后再试!') { tipsOp('你操作的太频繁了,请稍后再试!', 'error'); return false; } else if (data == '您的ip已被禁用,请联系管理员') { tipsOp('您的ip已被禁用,请联系管理员', 'error'); return false; } $(".commentparent").show(); $("#commentArea").append(data); $("#addcontent").val(''); }); } } /** * 加关注 */ function addFollow() { //alert($('#focusnum').text()); if (checkLogin()) { var uid = '0'; //if(uid==id){ // tipsOp('自己不能关注自己','error'); //}else{ $.post("index.php?action=share&view=info&id=33371&ajax=addfocus", function (json) { if (json.status == 1) { var num = parseInt($('#focusnum').html()) + 0; $('#focusnum').html(num + 1); } else { tipsOp('您已关注过此用户!', 'error'); } }, 'json'); // } } }
左边
QQ咨询
您可能遇到的问题?